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
На этой странице сайта вы можете посмотреть видео онлайн Difference Between Thread and Runnable in Java Explained in Malayalam With Examples длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь IT MALAYALAM CLASSROOM 05 Сентябрь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 101 раз и оно понравилось 3 зрителям. Приятного просмотра!