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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static modifier
 
Similar Threads
please explane me why is it so
Confusion in Polymorhphism Self test questions K&B Book
About Static
top lavel static clas