Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static modifier

 
sree visu
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ian Edwards
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic