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


Please Help Members By Posting Answers For Below Questions

How do I find jre version?

482


What is a yaml file in java?

499


What is native api in java?

494


Is java secure? : java security

506


What is jar file in java?

528






What is transactional in java?

528


What is gui in java with examples?

485


Explain different way of using thread?

596


Why there are no global variables in java?

524


In hibernate what is the difference between the Session and SessionFactory?

535


How do I install java re?

512


What is mq in java?

491


When do we go for java 8 stream api? Why do we need to use java 8 stream api in our projects?

568


differences between iterator and spliterator in java se 8?

557


What is map and flatmap?

621