Tahir Akram
Tahir Akram wrote:Hi rachers;
I want to understand the concept of calling BallSize enum via line 1 and line 2.
What is the difference between them. As they compiles fine.
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP6.0,My blog Ranchers from Delhi
phil sohan wrote:
Whether the enum is implicitly static.???
phil sohan wrote:
One of the most importanct question,that come into my mind rightnow is that...........
As we reference enum with a static(main) method then why not it is throughing Exception like"Non-static cannot be acessed from a static context"
Whether the enum is implicitly static.???
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP6.0,My blog Ranchers from Delhi
Tahir Akram
http://plainoldjavaobject.blogspot.in
it's not so that when enums are declared in a class they are static ...
they are static no matter where they are declared ...
SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6.0 96%
(Connecting the Dots ....)
Lalit Mehra wrote:it's not so that when enums are declared in a class they are static ...
they are static no matter where they are declared ...
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Sahil Kapoor wrote:@ Abimaran......
You are right that enum (Names) is implicitly static when declared inside class....But i think saying it top-level is wrong notion. If something is defined inside the scope of another, it is no more top level. Infact in K&B , they also says that Nested classes are top-level, dont you think its a wrong notion ???
What do you say ??
Thanks !!!
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 6.0 96%
(Connecting the Dots ....)
Sahil Kapoor wrote:@Abimaran
Thanks !!!
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |