You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 5, 2023. It is now read-only.
In abstract class, we no need to create an IIB block.
Program 1: Invoking object in Outer class
classOuter{
inta;
classInner{
voiddisplay(){
System.out.println("Inner class...");
}
}
Outer(inta){
this.a=a;
}
voiddisplay(){
System.out.println("outer...");
Innerin=newInner(); //object created/*If the object is created inside a function the scope is only inside it.*/in.display();
}
}
classOuterDemo{
publicstaticvoidmain(Stringargs[]){
Outerout=newOuter(10);
out.display();
}
}