aspose file tools*
The moose likes Beginning Java and the fly likes object of inner class - where can't we make Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "object of inner class - where can Watch "object of inner class - where can New topic
Author

object of inner class - where can't we make

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
At what place we can't make an object of regular inner class ???

thanks .
[ January 11, 2005: Message edited by: rathi ji ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
nowhere, with a bit of trickery you can instantiate them whereever you want to.


42
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I was also thinking the same .

1] inside outer class , inside a instance code :
MyInner m = new MyInner();

2] inside outer class , inside static code :
MyOuter.MyInner m = new MyOuter.new MyInner();

3] outside outer class ,inside any method static or instance :
MyOuter.MyInner m = new MyOuter.new MyInner(); // MyOuter shuld be visible
[ January 13, 2005: Message edited by: rathi ji ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: object of inner class - where can't we make