Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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: 23275
125
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!