Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Java by (13.1k points)
Can anyone help me understand what is runnable in Java?

1 Answer

0 votes
by (26.7k points)

Basically, runnable is an interface that is present in the thread and lets the thread what it supposed to do. You can take the below code snippet as a reference:

public class MyRunnableTask implements Runnable {

     public void run() {

         // do stuff here

     }

}

I hope this will help.

Want to know more about Java? Prefer this tutorial on Learn Java.

Want to become a Java Expert? Join Java Training now!!

Related questions

0 votes
1 answer
0 votes
1 answer
asked Nov 23, 2020 in Python by sabarish (200 points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...