Nested Classes in Java | Inner Classes in Java | Explained | Hindi

Pubblicato il: 24 novembre 2019
sul canale di: Learn Code With Durgesh
31,428
619

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  


In questa pagina del sito puoi guardare il video online Nested Classes in Java | Inner Classes in Java | Explained | Hindi della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Learn Code With Durgesh 24 novembre 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 31,428 volte e gli è piaciuto 619 spettatori. Buona visione!