In this video, i am going to explain what are the nested classes in java .
In java, it is possible to define a class within another class, such classes are known as nested classes. They enable you to logically group classes that are only used in one place, thus this increases the use of encapsulation, and create more readable and maintainable code.
The scope of a nested class is bounded by the scope of its enclosing class. Thus in above example, class NestedClass does not exist independently of class OuterClass.
A nested class has access to the members, including private members, of the class in which it is nested. However, reverse is not true i.e. the enclosing class does not have access to the members of the nested class.
A nested class is also a member of its enclosing class.
As a member of its enclosing class, a nested class can be declared private, public, protected, or package private(default).
Nested classes are divided into two categories:
static nested class : Nested classes that are declared static are called static nested classes.
inner class : An inner class is a non-static nested class.
Nested Classes in Java | Inner Classes in Java | Explained | Hindi
Learn Python in One Video in Hindi : • Learn Python in One Video | HINDI |
Learn Core Java Basics : • Video
Learn Servlet in Hindi: • Servlet and Jsp (Server Side Programming i...
Learn JDBC Programming : • JDBC(Java Database Connectivity)
Learn c,java,python,kotlin basics :
TechSoft INDIA official website: https://www.techsoftindia.co.in/
Durgesh Tiwari Website :
Follow me on Instagram: / durgesh_k_t
На этой странице сайта вы можете посмотреть видео онлайн Nested Classes in Java | Inner Classes in Java | Explained | Hindi длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Learn Code With Durgesh 24 Ноябрь 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 31,428 раз и оно понравилось 619 зрителям. Приятного просмотра!