Programming MCQS - QUESTION DETAILS

How do you create a thread in Java?
A. Using the run() method
B. Extending the Thread class
C. Implementing the Runnable interface
D. Both B and C

Both extending Thread and implementing Runnable can create a thread in Java.

Similar Questions

In C, how do you declare a constant?






What is the purpose of the 'break' statement in a switch statement?






What is the purpose of the 'typedef' keyword in C?






How is a single-line comment written in C?






What is the format specifier for printing a float in C?






Which of the following is not a valid C data type?






What does the 'printf' function do in C?






What is the output of printf("%d", 5 + 3 * 2);?






What is the role of 'calloc' function in C?






Which function is used to read a character from the standard input in C?