class Outer {
class Inner {
void print() {
System.out.println("Inner printing");
}
}
public static void main(String[] args) {
(new Outer().new Inner()).print();
}
}
What is the syntax of (new Outer().new Inner())
? Why the new
operator is used after a object?