This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes static inner class constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static inner class constructor" Watch "static inner class constructor" New topic
Author

static inner class constructor

Gary Kevin
Ranch Hand

Joined: Jul 24, 2006
Posts: 43

it compiles well,if i write a constructor for class BigOuter like this:



it still compiles well,I can't use the constructor like this:

why?


SCJP 5.0 72%
Mintoo kumar
Ranch Hand

Joined: Aug 21, 2007
Posts: 61
try to explore on static (which related to class not an object).
And remove static from inner class then check the code.
i am sure you will get difference and answer itself.

______________
Mintoo
SCJP 1.4
_____________
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi,

i think this will help you

-------------------------------
BigOuter.Nest n = new Nest();
n.go();
--------------------------------

thanks & regards,
seetharaman.v
 
GeeCON Prague 2014
 
subject: static inner class constructor