aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "static modifier" Watch "static modifier" New topic
Author

static modifier

sree visu
Ranch Hand

Joined: Jul 05, 2007
Posts: 133

D:\>javac testclass.java
testclass.java:1: modifier static not allowed here
static class Boy {
^
testclass.java:4: modifier static not allowed here
static class Girl extends Boy {
^
2 errors

I couldn�t understand this Please help me..Thanks in advance


Regards<br />Sree Visu<br />SCJP 5.0, SCWCD 5.0, SCJD(Preparing B&S 2.2.2)
Ian Edwards
Ranch Hand

Joined: Aug 14, 2006
Posts: 107
You can't use the static modifier on a top level class.

Perhaps the static modifier should be on the talk() methods or the question isn't from a reliable source.
sree visu
Ranch Hand

Joined: Jul 05, 2007
Posts: 133
thanks
 
Don't get me started about those stupid light bulbs.
 
subject: static modifier