Difference Between Thread and Runnable are:
Thread: Thread is a class. It is used to create a thread Sub-class. It has multiple methods including start() and run(). Each thread creates a unique object and gets associated with it. More memory required. Multiple Inheritance is not allowed in java hence after a class extends Thread class, it can not extend any other class.
Runnable: Runnable is a interface which is used to create a thread .It has only abstract method run(). Multiple threads share the same objects. Less memory required. If a class is implementing the runnable interface then your class can extend another class.
#javatutorial #javaforbeginners #javamalayalam
On this page of the site you can watch the video online Difference Between Thread and Runnable in Java Explained in Malayalam With Examples with a duration of hours minute second in good quality, which was uploaded by the user IT MALAYALAM CLASSROOM 05 September 2023, share the link with friends and acquaintances, this video has already been watched 101 times on youtube and it was liked by 3 viewers. Enjoy your viewing!