• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runnable Interface

 
Avneet Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have a class implementing runnable interface, but when i call one of the constructor of the class it doesnot call it. for eg class ABC implements runnable and i have put a constructor ABC with some params in the constructor.


In the above code there are two constructors.
The next code calls the code

Here when ReadXLS construct is called it does not print the line in the constructor for ReadXLS, and when i choose the other constructor with params it doesnt compile saying method not found.
Is it that when implementing runnable you cannot have a customized constructor accepting params with it.?

any help would be appreciated.
Thanks
Avneet
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a careful look at your constructors in ReadXLS.
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is not a constructor. Constructors do not have return types. This is a method that is unforunately named the same as the Class.
 
Avneet Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnx all
my fault
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic