Java OOP Tutorial for Beginners | Learn Objects & OOP Concepts Fast!
0 views
Jun 13, 2025
Java OOP Tutorial for Beginners – Learn the basic concepts of Object-Oriented Programming (OOP) in Java in this full course! Whether you're just starting or need a refresher, this video covers everything from Java objects, classes, inheritance, polymorphism, and more. 📘 What You’ll Learn: Java OOP basic concepts How to create and use Java objects Real-world examples of Object-Oriented Programming in Java Full hands-on Java OOP course OOP Java principles explained simply Perfect for Java beginners who want to master Object-Oriented Programming in Java the easy way! #javaooptutorial #javaobjects #javaoopfullcourse, #javaoopbasicconcepts #javaoopforbeginners, #oopjava #java #objectorientedprogrammingjava,
View Video Transcript
0:00
hi friends welcome to tutors funny
0:02
channel today i'm going to start the
0:05
in java wp stand for objectoriented
0:09
programming language if you want to
0:12
learn java very well you must know
0:14
object- oriented well so that's why i'm
0:18
bring this video if you have not learned
0:21
object oriented well you cannot continue
0:23
your programming journey so that you
0:25
must learn object oriented first so let
0:28
me start the object from the scratch
0:31
using class and objects right so class
0:34
and objects both are the crucial part of
0:38
the programming language so you can see
0:40
this programming this programming so you
0:43
can see this is a class
0:46
a class employee here the name must
0:50
start with the camel case you can see
0:52
the starting letter should be capital
0:56
this is a this is a naming compensation
0:58
you must know about that when you are
0:59
implement the name you must
1:02
you must uh remember start with capital
1:06
letter this is the rule of the
1:07
programming language you must know when
1:09
you are writing the class start with the
1:12
capital letter right so this is the main
1:14
thing you must know after that you have
1:17
to declaring the variables right so this
1:19
is the called as a attributes this is
1:22
the called as a behavior the class which
1:25
is empty like a blueprint here if you
1:27
are uh i have just cut off the the class
1:30
is empty this empty class inside the
1:32
empty class it has a this is called as a
1:36
attributes this is a behavior attribute
1:38
which is which is called as a variables
1:41
okay this is just a variable okay so the
1:45
okay okay in in this in this variable
1:50
we have to use in this method okay
1:53
method is a part it will be it will be
1:56
produce the action what the action we
1:59
have we can do in order to use this
2:02
variable that is the meaning of method
2:05
why what is the purpose we are using the
2:07
variables so we have to calculate the
2:10
salary and bonus so that task done by
2:14
this total pay method so we have to
2:16
calculate and assign to the total pay we
2:19
have to get into the total pay okay that
2:22
is the things it will be going to do all
2:24
right so we have this is the one class
2:28
we have another class which is a test we
2:30
have to get this objects this is a class
2:33
we have this this class we have to
2:35
create the objects okay right so this
2:38
program how to do in efficient way we'll
2:40
do it first i'm going to go to create
2:42
the new project in net bins you can use
2:46
any id you want uh whether you you go
2:48
along with the eclipse or intelligj
2:52
or vs code editor all the editors are
2:55
look like same you don't bother about
2:58
that editor is just
3:01
uh writing the code snipp
3:05
langes that keep in your mind okay so we
3:09
have to code select this uh java
3:12
application
3:14
you can see the java application
3:18
select this click next you have to here
3:21
create main class so i have uncheck it
3:23
this one you have to check this project
3:25
name which is a class object
3:33
okay so wp class object wp right now now
3:38
what you are going to do is i'm going to
3:40
click finish
3:42
project has been created here would go
3:44
to the source package default package
3:47
i'm going to create this here as i'm
3:49
going to create as employee which is the
3:51
first class
3:54
okay second class i'm going to make it
3:57
as a test this is second class
4:00
these are made two things
4:03
employee class first this is a class
4:06
which is a blueprint okay the blueprint
4:09
i'm going to create a double salary
4:14
after
4:17
double
4:20
bonus
4:22
right so
4:24
class and object employee is a class
4:27
inside the class we have a two
4:29
attributes two variables the attributes
4:32
you are convert as a variable what is a
4:34
class salary another one is a bonus
4:37
right both are double data type which is
4:41
which is a double data type after that
4:42
what you're going to you type public
4:44
static public wide you get total pay you
4:50
write total pay
5:01
you create one method total pay
5:04
okay so here also i'm going to
5:07
declaring another variable which is
5:12
calculate or total something like
5:17
you can create any name of the variables
5:19
namely now what you're going to do is
5:22
here i have declaring three variables
5:24
both are all the variables are belongs
5:27
to double data type now i'm going to
5:30
calculate and print the total value of
5:34
the salary and bonus right so this is
5:38
this is a method which will which done
5:40
by that action so we have to write it a
5:44
total equal salary
5:47
plus bonus
5:52
like salary and bonus both added and
5:55
assigned to the variable tot
5:58
system dot out dot print ln
6:05
here i have to pass in this tot
6:07
that's it okay
6:11
now here the test class
6:13
okay this is my this is the variables
6:15
this is the method the test class so
6:17
this is the object we can use it this is
6:19
the class so what you're going to do is
6:22
here this test class we have a this
6:25
class consist of the main method
6:28
public static
6:30
white main
6:33
string
6:37
args
6:42
right so what i'm going to do is i want
6:45
to this is a class okay now this class
6:50
we have created the employee class now
6:53
the employees uh you can imagine when
6:57
you're working in the company that
7:00
company should have only one employee no
7:04
the company
7:06
uh there is a company working on more
7:08
than one employee okay so so what i'm
7:13
going to do is here we have to get the
7:16
copy of the employee the copy of the
7:18
employee here we have to create the
7:20
objects copy which is nothing but the
7:22
objects okay that's a class and object
7:24
this is the class we have to create the
7:27
class once we have to take it the object
7:30
more than more than that okay so how to
7:34
create the object here right first you
7:36
have to write the class what is the name
7:38
you have created you have to create the
7:40
object so i'm going to create the object
7:42
which is a john is a one employee equal
7:46
new employee class is belongs to that
7:50
employee class john is a employee who
7:53
belongs to this employee class okay so
7:56
after that you have copy this again you
7:58
have paste it here another employee
8:00
which is an
8:02
is another employee of this company is
8:05
another another object okay so the
8:07
another one is that someone
8:10
is a employee of that class okay so how
8:13
to create the object using this new
8:15
keyword you have to using this new
8:16
keyword the object has been created the
8:20
using this new keyword this object has
8:21
been created using this new keyword this
8:24
object has been created okay so this we
8:27
have created the objects
8:29
right so first what i'm going to i'm
8:31
take it of this one so
8:34
john is a employee okay so john is a
8:37
employee the john we have to create the
8:39
object so the john which is employee
8:41
class john can access salary bonus total
8:45
pay so we have given the john so we have
8:50
to first you have to build this one john
8:55
dot okay john we can get give the salary
9:00
equal i'm going to give 20,000 for
9:03
salary for john after that we have give
9:07
the john bonus
9:09
john which is employee he must as a
9:12
bonus as well
9:14
which is a bonus of john
9:20
that's it john we need to add a
9:24
having a
9:26
total calculate method as well here the
9:29
total as total
9:35
right that's it
9:38
okay known as a total print method the
9:41
same thing you have to copy you have to
9:43
put it the n as well the same thing that
9:48
go to the 10 you have to write a bonus
9:51
500 like that same thing this is i mean
9:55
only the thing we have to change it as a
9:57
name only okay now you have the idea now
10:00
let's run and check before that you have
10:02
to clear the all the caches and all you
10:05
have to run it test class okay
10:09
this one should be
10:16
uh here this output is coming so you can
10:18
see uh 21,000 mean
10:27
here this 21,000 mean uh where this
10:30
program
10:34
here 20 plus bonus mean,000 to 21,000
10:40
which is output after that
10:43
10,500 mean you can see 10,000 + 500
10:49
both calculator and display 10,500
10:53
will be the total now you have a clear
10:56
idea how the object oriented it works
10:59
class and objects you simply you have to
11:01
create the class using the variables and
11:04
method we have can create another class
11:08
which is a test that class we have to
11:10
include the main method we have simply
11:12
to create the object and we have to use
11:13
it only one class we have this method
11:17
only we are passing one method so we
11:19
have to post in
11:21
uh this method we can access more than
11:24
one employee this is simple stuff
11:26
imagine you have a 100 employee in that
11:29
class you can use it like this way this
11:31
simple otherwise you can every time you
11:34
have to calling salary and salary salary
11:37
bonus bonus you have to use one time
11:39
this class we can use reuse it in the
11:42
entire program that's why we have we
11:44
have to understand what is the object
11:46
oriented programming okay if you know
11:49
these things well you will be able to uh
11:52
go uh go forward into your pro java
11:55
journey as a spring boot developer okay
11:57
so otherwise you cannot so you have to
12:00
keep learning this one thank you for
12:01
watching
#Development Tools
#Educational Software
#Java (Programming Language)
#Programming
#Software