Hello,
Your code is also using inner class.I wan't to know why can't we separate the two classes as independent and with the help of getter methods of Outer Inner class , Inner class can access it's...
Type: Posts; User: Swapneel
Hello,
Your code is also using inner class.I wan't to know why can't we separate the two classes as independent and with the help of getter methods of Outer Inner class , Inner class can access it's...
class Outer
{
private int temp=9;
class Inner
{
void getData()
{
System.out.println("Value of temp is"+temp);
}
}