Want to master Java OOP from scratch? In this tutorial, you'll learn what are classes and objects in Java with simple explanations and real-world examples.
This video is perfect for beginners who want to understand oop java, java oop, and how object-oriented programming works in Java. We will cover the fundamentals of class and objects in java, create practical examples, and discuss how these concepts are used in real applications.
Whether you're following a java course, preparing for interviews, or looking for java oop projects for beginners, this lesson will help you build a strong foundation in Java programming.
📚 In this video, you'll learn:
✅ What are classes and objects in Java
✅ How to create classes and objects
✅ Core concepts of Java OOP
✅ Real-world OOP examples
✅ Beginner-friendly Java coding practices
This lesson is also a great starting point if you're looking for an oop in java full course that explains concepts step by step.
🔥 Don't forget to Like, Share, and Subscribe for more Java programming tutorials, coding projects, and software development content.
#JavaOOP #OOPJava #JavaCourse #JavaProgramming #ClassesAndObjectsInJava #JavaTutorial #LearnJava #JavaForBeginners #JavaOOPProjects #CodingTutorial
Show More Show Less View Video Transcript
0:00
Hi, friends. Welcome to Tutor's Funny
0:03
Channel. Today, I'm going to teach about
0:06
how to work with Cloud AI in Java.
0:10
So, the Cloud AI, this is the very best
0:13
AI for programmers. Okay, those who are
0:16
uh interested in programming journey, so
0:18
the Cloud AI is very good. So,
0:20
uh now you are
0:22
there are programmers, they must learn
0:25
developing concept. Developing concept,
0:27
you must first you have to learn master
0:29
this one is the class and objects. It's
0:32
a very essential uh things to build up
0:34
your software journey.
0:36
So, here is a simple I just tell them
0:39
uh open up my Cloud AI. I just type the
0:42
prompt class object example Java.
0:46
Simple one-line prompt I gave.
0:48
So, the
0:50
based on the prompt
0:51
uh
0:53
Cloud AI given
0:55
given the output look like this. So, you
0:57
can see here.
0:59
This is a [clears throat] class. Simple
1:02
the implementation of the class.
1:04
Okay, simple class. So, you can see the
1:06
class has a
1:08
This is one class. The class is just a
1:11
blueprint.
1:12
Okay, just a blueprint. It has
1:15
attributes and methods.
1:18
Okay, this is attributes and
1:20
Okay, this is that's all.
1:22
Class is nothing but
1:24
but
1:26
attributes and
1:28
What's the attribute mean? That is the
1:30
properties.
1:32
Okay, so that it is nothing but a
1:33
variables of the class. The variable
1:36
there are we define two variables, those
1:38
are brand and speed. Car
1:42
it should have a
1:43
attribute.
1:45
Okay, it has a car should have a brand.
1:47
So, if you are
1:48
if you have a car
1:50
if you
1:51
if you buy a car imagine if you are
1:53
going to buy a car, that should be the
1:54
brand. Without a brand, you can't drive.
1:56
Okay, there there, there should be a
1:58
brand.
1:59
It may be
2:01
Toyota or which there are etc. etc.
2:04
There are plenty of brands available in
2:07
the market. Okay, so you can choose one
2:09
of them and you will be able to buy. So,
2:12
after that there should be the method.
2:14
What is the meaning of method? It is
2:17
action.
2:19
Okay, that is the action. Action mean
2:22
car we can drive.
2:23
Okay, we can drive. We can break. Okay,
2:26
so we can stop. Those are called as a
2:29
method.
2:30
Okay, the method which is nothing but
2:33
action of the
2:36
class. Okay,
2:37
the
2:39
attribute which is a
2:40
properties.
2:42
Okay, so these are the this this month
2:44
you must understand the things.
2:47
Okay, so the how to implement at this
2:49
process
2:51
in main method.
2:52
Okay, so what is the purpose of this we
2:54
are creating in the real world. When you
2:57
class and object, what is the meaning?
2:59
So, meaning is you have create one
3:02
class, you will be able to reuse this
3:05
class in entire software program.
3:08
Okay, you can
3:09
this method all the methods of create
3:11
once, you can reuse whatever in the
3:13
program. That is the
3:15
purpose. So, let's driving to that
3:18
things. So, what I'm going to do is I'm
3:20
going to create this how to implement
3:22
this
3:22
journey. I open up the uh
3:25
NetBeans IDE. So, I'm going to open up
3:27
the project. We have to go to that
3:29
Java and Java application.
3:33
Next,
3:34
uh if it is a main class, so that
3:36
I want to
3:38
I don't want to create a main class over
3:40
here. So, we have to create a main class
3:42
later on.
3:44
So, you have to
3:45
type it here. This is a class which is
3:47
name is
3:48
uh project
3:49
class
3:51
objects.
3:57
Give them the meaningful name. That is a
3:59
must.
4:03
So, here
4:04
define the package.
4:06
class
4:07
So, here I'm going to give the next
4:09
class is a class name. This is class.
4:12
car
4:15
Here simply it is created as a class.
4:17
This one we don't need them. Get rid of
4:19
this line. Only the class as a
4:21
blueprint.
4:23
After that what I'm going to we have
4:24
created the simple properties. What is
4:25
the string?
4:30
What is the class?
4:33
What is the name? brand
4:39
in speed
4:45
The main method we have called as a
4:48
void
4:50
Okay? Without
4:51
putting the public or here it is called
4:53
as a private.
4:55
Okay? So, we have write the private.
4:56
It's enough for us.
4:57
void
4:59
So, try.
5:02
Okay?
5:05
Now what I'm going to inside here you'll
5:07
be able to write it. What is the thing
5:08
is you have to write you have to write
5:09
system.out.println.
5:23
You can pick up
5:25
and you can write all the text here. I
5:27
just write write it here.
5:31
Okay? Without wasting the time.
5:33
Okay?
5:34
So, these are things. So, the main
5:36
method I want to create it not here. I'm
5:39
going to create separate separate
5:41
separate class.
5:43
This class main.
5:46
Main class we have to implement the main
5:48
You have to write the public
5:51
static
5:52
void main.
5:55
You have to write implement the string
5:58
a r g s
6:02
You have to write it over here.
6:05
You have to take it this class
6:07
car
6:09
create the object c whatever name so car
6:12
name here you have to write Toyota.
6:15
This is a Toyota class. Toyota.
6:17
Toyota.
6:19
This name is Toyota and new
6:21
you have to write a car. Okay, this is
6:23
the instance of the way. This is called
6:25
as a object. You have to create the
6:26
objects. It's a instance of the class.
6:28
We have to call it as a instance of the
6:30
class. Okay, this is how to how to
6:32
create the object using this new key.
6:34
Okay, the objects are the instance of
6:36
the class. You have to understand what
6:38
is the instance of the class. Objects
6:39
are called as the instance of the class.
6:41
How to create the object?
6:43
Using along with the new key.
6:45
Okay, so how to
6:47
call how to get this all the properties
6:49
from this main method? You have to just
6:52
write a
6:53
all the all this class Toyota dot Now
6:57
you'll be able to access that
7:00
uh
7:00
property as well here. This all the
7:02
properties will be able to access.
7:04
Simply we'll be able to access all the
7:06
properties and all.
7:08
Okay, we can access the property and
7:10
all. So how to access? So that I want
7:11
access the
7:13
speed
7:14
brand and I have mentioned it
7:19
Toyota.
7:23
Okay.
7:24
After that
7:26
I'm going to write a brand speed.
7:32
You have the speed.
7:34
You have to mention it
7:36
120.
7:40
Okay, so
7:41
it is here. This class is we have to
7:44
this class we have to only the main
7:46
class I have getting. Okay, whatever
7:48
class you can reuse it this this all the
7:50
variables, okay? So, I want to print out
7:53
this all the things. So, we have a
7:54
method called void.
7:57
Method void
7:59
in this class. Okay, so how to get them?
8:01
This also you can write in here.
8:03
Toyota
8:04
dot
8:06
void drive.
8:09
Okay? Let's run the program and check.
8:18
Here,
8:19
Toyota is driving at
8:22
this speed.
8:24
Simply, it is written.
8:26
It's simply written. What happen is if
8:28
you have called this one, it's goes to
8:31
here.
8:32
Okay, what is the brand you are
8:33
assigning here, put it here. It is
8:36
What is the properties are given here,
8:38
it is assigned to here. This is assigned
8:40
here. This This all the things are
8:42
passing to here.
8:44
So, so here it is called as brand. What
8:46
is the brand you are
8:48
gave the assigning there, it is coming
8:50
here. What is speed you are given here,
8:52
uh given there, it is coming here. So,
8:55
if you are change it as a 150,
8:57
change here here 150.
9:00
It is a
9:01
car you have to call it as that's a
9:03
uh
9:06
Audi.
9:08
Audi
9:10
Here, it's called as Audi.
9:12
This we are simply make the programming
9:15
along with the Adding A is a very
9:17
powerful
9:18
uh tool. So, I So, so So, you can see
9:22
if you are successfully complete this
9:24
one, you have created another object of
9:26
the class, you can create another one.
9:27
Same thing.
9:29
I only created for
9:32
this one. So, if you want to create
9:33
another object, so how to create it?
9:35
Same thing.
9:38
car two
9:39
You can write this is a car one or you
9:41
can pick car two.
9:43
Audi or something.
9:48
BMW You can write it BMW. It's a BMW.
9:52
brand BMW
9:56
250
10:01
Okay?
10:03
250 So, let's
10:06
here.
10:08
Uh Audi is printed. So, we have to
10:11
create a lot of interesting things. BMW.
10:12
So, what I'm doing is this is not a
10:14
Uh it's BMW BMW BMW.
10:17
Okay? So, this object we have to call it
10:19
over here. Now, you can see
10:22
BMW is printed over here.
10:24
Okay? So, this is how So, sorry. Here we
10:28
have we haven't put in this one.
10:31
Toyota drive
10:33
Now, you can see here.
10:35
Here, both these work. Audi is first
10:37
printed. So, second Here, we have a
10:40
plenty of cars. So, each and every class
10:42
we have to create the one object.
10:45
Okay? The Toyota, you have to create one
10:47
object. You're passing the brand and
10:49
speed. Then, you have to call that
10:51
particular method. If you have to brand
10:53
BMW, we have to create we have to get
10:55
that properties brand and speed and call
10:57
them that respective method drive. It is
11:00
working. This is This is how we have
11:02
simply implemented the double OP concept
11:04
in the real world. Thank you for
11:05
watching.
#Jobs & Education

