cant we call run() method directly instead of calling indirectly through the start()
method ? if we do so then what is the problem ?
Answer Posted / will
Calling run() without calling start() will effectively
execute run() in the current thread.
Calling start() will kick off a seperate thread,from your
current thread, which will then call run().
| Is This Answer Correct ? | 12 Yes | 4 No |
Post New Answer View All Answers
How can I swap two variables without using a third variable?
What is an api in java?
What is stateful in java?
Why bean class is used in java?
What are struts java?
Which framework is best for rest api java?
Why doesn't lsdou work under windows nt? : java security
1.can i use super keyword in normal class(not inheritance) to call any method?if so how can i call particular variable? 2.In the inheritance how can i access the particular variable from the base class(it containing 5 variables) using super keyword?
In a barber shop there are 2 doors. customer come in 1 door, leave in other. minimum # of chairs. barber spend his life in cutting. always barber can cut 1 customer. few chairs in the shop. if barber busy customer waits, if chairs full, customer leave. if no customer, barber sleeps. treat barber and customer as 2 threads. you can use Semaphore class with arrive and depart and count as parameter.
What is cloning in java?
How do I run a java project in netbeans?
What is a pojo class in java?
Are the actual permissions for the application defined at run-time or compile-time? : java security
What is meant by swing in java?
What is flatmap in java8?