Discussion :: Inner Classes - General Questions (Q.No.7)
|Shahul said: (May 6, 2013)|
|Option B is correct, since inner class is static.
Object of inner class is not bounded with object of outer class.
|Khizar said: (Aug 14, 2015)|
|Is option A correct. It doesn't have () for myouter.
I think like the correct answer will be:
MyOuter.MyInner m = new MyOuter().MyInner();
|Raja said: (Nov 30, 2015)|
|So which one is exact answer guys. I'm confused by looking into your responses.|
|Kiko said: (May 17, 2016)|
|Option B is the correct answer. Since static nested class , we can directly create instance for inner class object.
It will be,
MyOuter.MyInner mi=new MyInner();
Above must do.
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.