- 1

Fill in the blanks to implement the Runnable interface and run a new thread.

class A _______ , ______ { public void run() { System.out.println("Bye"); } } public class App { public static void main(String[ ] args) { Thread ob = new Thread(new _____ ()); ob. ______(); } } ----------- 1. A 2. start 3. Runnable 4. App 5.implements 6.Thread

13th Nov 2016, 2:47 PM
anjanel macalaguim
12 Answers
+ 6
class A implements Runnable { public void run() { System.out.println("Bye"); } } public class App { public static void main(String[ ] args) { Thread ob = new Thread(new A ()); ob. start(); } }
13th Nov 2016, 2:53 PM
damilare lamidi
damilare lamidi - avatar
+ 5
implements Runnable A start
16th May 2019, 9:33 AM
Ashani Umeendra Franciscus
Ashani Umeendra Franciscus - avatar
+ 1
class A implements Runnable { public void run() { System.out.println("Bye"); } } public class App { public static void main(String[ ] args) { Thread ob = new Thread(new A ()); ob. start (); } }
18th Apr 2018, 5:03 AM
Muhammad Zabri Sulaiman
Muhammad Zabri Sulaiman - avatar
+ 1
interface a{ } interface b{ } class Test:a_b{ };
19th Feb 2019, 12:04 PM
Divyanshu Singh
Divyanshu Singh - avatar
+ 1
class A implements Runnable { public void run() { System.out.println("Bye"); } } public class App { public static void main(String[ ] args) { Thread ob = new Thread(new A ()); ob.start (); } }
2nd Aug 2019, 2:09 AM
Mewan Athukorala
Mewan Athukorala - avatar
+ 1
Drag and drop from the options below to implement the Runnable interface and run a new thread. Answer :- class A implements Runnable { public void run() { System.out.println("Bye"); } } public class App { public static void main(String[ ] args) { Thread ob = new Thread(new A()); ob.start(); } }
30th Jun 2020, 5:48 AM
Gourav Tomar
Gourav Tomar - avatar
+ 1
interface a{ } interface b{ } class Test:a,b{ };
2nd Jan 2021, 2:55 PM
Mauricio Klaus
Mauricio Klaus - avatar
0
Thank you so much ~
14th Nov 2016, 8:39 AM
anjanel macalaguim
0
you're welcome
14th Nov 2016, 8:56 AM
damilare lamidi
damilare lamidi - avatar
0
class A extends Thread { public void run () { System.out.println("Hello"); } public static void main(String[ ] args) { A object = new A(); object. start (); } } This is correct
1st Aug 2019, 5:06 AM
Mewan Athukorala
Mewan Athukorala - avatar
0
class Program { static void Main(string[] args) { Draw pencil = new Draw(); Draw brush = new Brush(); Draw spray = new Spray(); pencil.StartDraw(); brush.StartDraw(); spray.StartDraw(); } } /* Draw => "Using pencil" Brush => "Using brush" Spray => "Using spray" */ public interface IDraw { void StartDraw(); } class Draw : IDraw { public virtual void StartDraw() { Console.WriteLine("Using pencil"); } } //inherit this class from the class Draw class Brush : Draw { public override void StartDraw() { Console.WriteLine("Using brush"); } //implement the StartDraw() method } //inherit this class from the class Draw class Spray : Draw { public override void StartDraw() { Console.WriteLine("Using spray"); } //implement the StartDraw() method }
19th Sep 2021, 4:35 AM
Jobayrul Hasan
Jobayrul Hasan - avatar
0
implements Runnable A start
1st Jan 2022, 11:32 AM
M.I.M.Aqueel
M.I.M.Aqueel - avatar