
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
Difference Between Thread Class and Runnable Interface in Java
In this post, we will understand the difference between
Thread
It is a class.
It can be used to create a thread.
It has multiple methods such as ‘start’ and ‘run’.
It requires more memory space.
Since multiple inheritance is not allowed in Java, hence, after a class extends the Thread class, it can’t extend to any other class.
Every thread creates a unique object and associates with it.
Runnable
It is a functional interface.
It can be used to create a thread.
It has a single abstract method ‘run’.
It requires less memory space.
When a class implements the ‘runnable’ interface, the class can extend to other classes.
Multiple threads can share the same objects.
- Related Articles
- Difference between Thread and Runnable in Java
- Difference between Runnable and Callable interface in java
- Difference Between Class and Interface in Java
- How to create a thread without implementing the Runnable interface in Java?
- Difference between Abstract Class and Interface in Java
- Difference Between Interface and Abstract Class in Java & C#
- What is Runnable interface in Java?
- Implement Runnable vs Extend Thread in Java
- Difference between abstract class and interface
- Differences between Interface and class in Java
- Difference between Abstract Class and Interface in C#
- Differences between abstract class and interface in Java
- Difference between Abstract Class and Interface in C# Program
- How to implement the Runnable interface using lambda expression in Java?
- Difference Between Iterator and Enumeration Interface in Java

Advertisements