Back to Top

Sunday, 15 January 2012

JAVA : Diff between Runnable Interface and Thread class while using threads.

1. If you want to extend the Thread class then it will make your class unable to extend other classes as java is having single inheritance feature whereas If you implement runnable interface, you can gain better object-oriented design and consistency and also avoid the single inheritance problems.

2. Extending the thread will give you simple code structure in comparison to Runnable Interface.

3. Using Runnable Interface, you can run class several times whereas Thread have the start() method that can be called only once.

1 Responses to “ JAVA : Diff between Runnable Interface and Thread class while using threads. ”

Naviya Nair said...
24 October 2016 at 15:21

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai

Online Java Training Java 8 Online Training | Java J2EE Online Training | JavaEE Training Institute in Chennai Java Training Institutes

Java Training Institutes in Chennai Java Training in Chennai


Post a Comment

Popular Posts

Subscribe via Email
Subscribe Java Interview Questions via Email
All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar
blog links Web Directory Academics Blogs