1. The following block of code creates a Thread using a Runnable target: Runnable target = new MyRunnable(); Thread myThread = new Thread(target); Which of the following classes can be used to create the target, so that the preceding code compiles correctly?





Write Comment

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Tags
Show Similar Question And Answers
QA->A computer has 8 MB in main memory, 128 KB cache with block size of 4KB. If direct mapping scheme is used, how many different main memory blocks can map into a given physical cache block?....
QA->A school has only three classes comprised of 40, 50 and 60 students respectively. In these classes, 10%, 20% and 10% students respectively passed in the examinations. What is the percentage of students passed in the examination from the entire school?....
QA->Cylinder block construction by mono-block is preferred to individual cylinder construction because of?....
QA->Under Payment of Bonus Act, an employee is eligible to get bonus if he has worked for not less than ……days in the preceding year.....
QA->'Block Structure' was first introduced in which project with separate target and reporting duties for village level workers?....
MCQ->The following block of code creates a Thread using a Runnable target: Runnable target = new MyRunnable(); Thread myThread = new Thread(target); Which of the following classes can be used to create the target, so that the preceding code compiles correctly?....
MCQ->What will be the output of the program? class MyThread extends Thread { MyThread() {} MyThread(Runnable r) {super(r); } public void run() { System.out.print("Inside Thread "); } } class MyRunnable implements Runnable { public void run() { System.out.print(" Inside Runnable"); } } class Test { public static void main(String[] args) { new MyThread().start(); new MyThread(new MyRunnable()).start(); } }....
MCQ->What will be the output of the program? class MyThread extends Thread { MyThread() { System.out.print(" MyThread"); } public void run() { System.out.print(" bar"); } public void run(String s) { System.out.println(" baz"); } } public class TestThreads { public static void main (String [] args) { Thread t = new MyThread() { public void run() { System.out.println(" foo"); } }; t.start(); } }....
MCQ-> A school consisting of a total of 1560 students has boys and girls in the ratio of 7:5 respectively. All the students are enrolled in different types of hobby classes, viz: Singing, Dancing and Painting.One-fifth of the boys are enrolled in only Dancing classes.Twenty percent of the girls are enrolled in only Painting classes.Ten percent of the boys are enrolled in only Singing classes.Twenty four percent of the girls are enrolled in both Singing and Dancing classes together.The number of girls enrolled in only Singing classes is two hundred percent of the boys enrolled in the same.One-thirteenth of the boys are enrolled in all the three classes together.The respective ratio of boys enrolled in Dancing and Painting classes together to the girls enrolled in the same is 2 :1 respectively.Ten percent of the girls are enrolled in only Dancing classes whereas eight percent of the girls are enrolled in both Dancing and Painting classes together.The remaining girls are enrolled in all the three classes together.The number of boys enrolled in Singing and Dancing classes together is fifty percent of the number of girls enrolled in the same.The remaining boys are enrolled in only Painting classes.What is the total number of boys who are enrolled in Dancing ?
 ....
MCQ->What will be the output of the program? class MyThread extends Thread { public static void main(String [] args) { MyThread t = new MyThread(); Thread x = new Thread(t); x.start(); / Line 7 / } public void run() { for(int i = 0; i < 3; ++i) { System.out.print(i + ".."); } } }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions