Inner Classes - Java

A class within an another class is called as nested class or inner class, they will provide security mechanisam in java

WRITE A PROGRAM ON INNER CLASSES.

class Abc
{
int m=10;
public void get()
{
xyz x=new xyz();
x.put();
}
class Xyz
{
public void put()
{
System.out.println("value of m"+m);
}
}
}
class Sample
{
public static void main(String args[])
{
Abc a=new Abc();
a.get();
}
}

 

For
More Explanation
&
Online Classes

Contact Us: +919885348743