Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

if a class that implements runnable is called, what runs first, constructor or the run()?  RSS feed

 
John McDowell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
question says it all.
 
Henry Wong
author
Sheriff
Posts: 22819
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John McDowell wrote:question says it all.


You need to construct an object before you can call an instance method on it... this is true for any object in Java.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!