I created a class X which implements runnable interface then created a object class ObjX then ObjX.start(). My question is I was expecting compiler error but it did run successfully. Since runnable interface has only one method run() and in my class X I did not declared start() method...so from where did it pulled from.
hello friend, there are two ways you can make a class as thread ie you extend Thread class and the second one is by implmenting the interface Runnable so you have done the second one and no need of using the start() menthod and you should not even get compile time error.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop