This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes why this code giving error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "why this code giving error " Watch "why this code giving error " New topic
Author

why this code giving error

Johhn Davis
Greenhorn

Joined: Sep 20, 2012
Posts: 16



Eclipse displays error -----> at thread.main(thread.java:11)
shiva pandey
Greenhorn

Joined: Jan 24, 2011
Posts: 10
You are putting method inside method . Put your run method outside the main.
Johhn Davis
Greenhorn

Joined: Sep 20, 2012
Posts: 16
It reveals we can't defined a method inside another method. Is it ?
thanks for reply.
shiva pandey
Greenhorn

Joined: Jan 24, 2011
Posts: 10
Yes , we can not define method inside the method.
simon lin
Greenhorn

Joined: Nov 20, 2006
Posts: 3
If you meant to override the run method of the thread you are defining

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why this code giving error
 
It's not a secret anymore!