Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why this code giving error

 
Johhn Davis
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Eclipse displays error -----> at thread.main(thread.java:11)
 
shiva pandey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are putting method inside method . Put your run method outside the main.
 
Johhn Davis
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It reveals we can't defined a method inside another method. Is it ?
thanks for reply.
 
shiva pandey
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes , we can not define method inside the method.
 
simon lin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you meant to override the run method of the thread you are defining

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic