Click here to watch in Youtube :
https://www.youtube.com/watch?v=KQb3m_HhQ3g&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
A.java
OuterClassTest.java
https://www.youtube.com/watch?v=KQb3m_HhQ3g&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java why to use nested classes |
Java Tutorial : Java why to use nested classes |
Java Tutorial : Java why to use nested classes |
Java Tutorial : Java why to use nested classes |
Java Tutorial : Java why to use nested classes |
//OuterClass public class A { private int value = 10; //InnerClass class B { int c; public void innerDisplay() { System.out.println("value : " + value); } } }
public class OuterClassTest { public static void main(String[] args) { A a = new A(); A.B b = a.new B(); b.innerDisplay(); } }
value : 10
https://sites.google.com/site/javaee4321/java/NestedClassDemo-Why-App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/NestedClassDemo-Why-App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/d3069ae3fffccb0c6ba4336662b6a2619d880c61/BasicJava/NestedClassDemo-Why-App/?at=master
See also:
No comments:
Post a Comment