0% found this document useful (0 votes)
444 views5 pages

Test Your Understanding Threads PDF

The document is a test report that summarizes the results of a test on Java threads and concurrency patterns. It indicates that the test was completed on March 20, 2020 in 40 seconds and received a perfect score of 100% by answering 3 multiple choice questions correctly. The feedback congratulates the tester on passing by securing over 80%.

Uploaded by

shubham_narkhede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
444 views5 pages

Test Your Understanding Threads PDF

The document is a test report that summarizes the results of a test on Java threads and concurrency patterns. It indicates that the test was completed on March 20, 2020 in 40 seconds and received a perfect score of 100% by answering 3 multiple choice questions correctly. The feedback congratulates the tester on passing by securing over 80%.

Uploaded by

shubham_narkhede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Threads, Concurrency Patterns / Java Threads / Test Your

Understanding

Started on
Friday, 20 March 2020, 12:19 PM

State
Finished

Completed on
Friday, 20 March 2020, 12:20 PM

Time taken
40 secs

Marks
3.00/3.00

Grade
100.00 out of 100.00


Feedback Congratulations!! You have passed by securing more than 80%
Question 1

Correct

Mark 1.00 out of


1.00

Predict the output of below code:

class MyThread extends Thread {

 public void run(int a) {

  System.out.println("Important job running in MyThread");

 }

 public void run(String s) {

  System.out.println("String in run");

 }

class Test {

 public static void main(String[] args) {

  MyThread t1=new MyThread();

  t1.start();

 }}

Select one:

a. Important job running in MyThread String in run

b. String in run

c. Important job running in MyThread

d. No Output

e. Compile Error

Your answer is correct.


The correct answer is: No Output

Question 2

Correct

Mark 1.00 out of


1.00

Synchronization is achieved by using which of the below methods.

Select one or more:

 a. Synchronized blocks

b. Synchronized interfaces

c. Synchronized classes

 d. Synchronized methods 

e. Synchronized abstract classes

Your answer is correct.

The correct answers are: Synchronized blocks, Synchronized methods


Question 3

Correct

Mark 1.00 out of


1.00

State whether TRUE or FALSE.

class MyThread extends Thread {

 public void run() {

  System.out.println("Important job running in MyThread");

 }

 public void run(String s) {

  System.out.println("String in run is " + s);

 }

class Test {

 public static void main(String[] args) {

  MyThread t1=new MyThread();

  t1.start();

 }

The below code will compile & provide the output: Important job
running in MyThread

Select one:

True 

False

The correct answer is 'True'.


Privacy Policy
Powered by TEKSTAC

Social Media Policy

You might also like