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
Auf dieser Seite können Sie das Online-Video Nested Classes in Java | Inner Classes in Java | Explained | Hindi mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learn Code With Durgesh 24 November 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 31,428 Mal angesehen und es wurde von 619 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!