No video

#62 Inner Class in Java

  Рет қаралды 96,955

Telusko

Telusko

Күн бұрын

Check out our courses:
Enterprise Java Spring Microservices: go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-sp...
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
Java:- bit.ly/JavaUde...
Spring:- bit.ly/SpringU...
Java For Programmers:- bit.ly/javaPro...
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusk...
In this lecture we will learn:
- What is an inner class in Java?
- Static inner classes in Java
- Advantages Of inner class
#1
Inner Class:-
- We can also create a class inside another class.
class A
{
class B
{
}
}
- You can call the method of class B by using the dot operator in between both classes A and B.
A.B obj= new B();
- A dollar sign will be introduced in a class name that has an inner class indicating two different classes.
A$B. class
- You also need to create an object of the outer class, to call the methods of an inner class.
#2
Static Inner Class:-
- An inner class can also be declared as static.
- When an inner class is declared as static, then you do not need to create an object for it.
- But an outer class can not be made static.
#3
Advantage of inner class:-
- Nested classes represent a particular type of relationship that is it can access all the members of the outer class, including private.
- Nested classes make the code more readable and maintainable.
- It makes the code more optimize.
Github repo : github.com/nav...
Java:- bit.ly/JavaUde...
Spring:- bit.ly/SpringU...
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Пікірлер: 13
@raghavsood768
@raghavsood768 Жыл бұрын
Only inner class can be static
@seeesh1165
@seeesh1165 11 ай бұрын
Bro is the best teacher in the world !
@priyanshu6339
@priyanshu6339 Жыл бұрын
Good explaination
@user-ju2tj3kr6n
@user-ju2tj3kr6n 3 ай бұрын
Thanks
@sheikhraisulislam4483
@sheikhraisulislam4483 Жыл бұрын
really good
@toptecher1633
@toptecher1633 4 ай бұрын
sir when i am doing so i am getting error obj package not found A obj = new A(); A.B = new obj.B(); //i have made class A and B as you made //when i make B static it works well
@talhaofficial87
@talhaofficial87 3 ай бұрын
but sir ham to static ka object banaty hi nahi hy to ye kese ho raha hy
@reddykailasam1617
@reddykailasam1617 3 ай бұрын
Sir, please can u do videos in telugu? Your explanation is wonderful. If u do videos in telugu, a lot of telugu people will understand and learn Java
@abhis1560
@abhis1560 Жыл бұрын
Are all inner class static and vice versa
@harshabannaravuri9229
@harshabannaravuri9229 Жыл бұрын
Why outer class cannot be private are protected
@gamingdipesh8389
@gamingdipesh8389 11 ай бұрын
because it would make it inaccessible to other classes, including its inner classes, violating the fundamental access control rules.and other rule says classes should start from class we cant take any thing in front of them this is general rule
@bollywoodpoezierd8279
@bollywoodpoezierd8279 2 ай бұрын
I don't understand why you need innerclass
@Notmyrealnamet
@Notmyrealnamet Жыл бұрын
Thanks
#63 Anonymous Inner Class in Java
5:08
Telusko
Рет қаралды 78 М.
#65 What is Interface in Java
8:03
Telusko
Рет қаралды 193 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 28 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 29 МЛН
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 37 МЛН
#61 Abstract Keyword in Java
12:09
Telusko
Рет қаралды 143 М.
#60 Wrapper Class in Java
8:08
Telusko
Рет қаралды 171 М.
#66 Need of Interface in Java
8:32
Telusko
Рет қаралды 125 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1 МЛН
#59 Upcasting and Downcasting in Java
6:37
Telusko
Рет қаралды 96 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,7 МЛН
Java Anonymous Inner Classes Explained in 6 Minutes
6:27
Coding with John
Рет қаралды 96 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 28 МЛН