aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java Threading and OOP Fundamentals
  • Thread t = new Thread(r); what is r here
Multiple choice technology programming languages

Thread t = new Thread(r); what is r here

  1. String

  2. Thread object

  3. Primitive data type variables

  4. object of a class which implements Runnable

Reveal answer Fill a bubble to check yourself
A,D Correct answer

Keep practicing — related questions

  • A class can be converted to a thread by implementing the interface
  • Given: 1. public class Threads4 { 2. public static void main (String[] args) { 3. new Threads4().go(); 4. }...
  • A class can be converted to a thread by implementing the interface ___.
  • What will be the output of the program? class MyThread extends Thread { MyThread() {} MyThread(Runnable r) ...
  • public class MyRunnable implements Runnable { public void run() { // some code here } } Which of these will...
  • Given: 1. public class Threads3 implements Runnable { 2. public void run() { 3. System.out.print("running")...
  • class MyThread extends Thread { MyThread() { System.out.print(" MyThread"); } public void run() { System.ou...
  • What is the signature of the constructor of a thread class?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy