1Z0-830 Web TestEngine demo

Exit VCEDump 1Z0-830 Java SE 21 Developer Professional
Question 11 of 15
0% complete
Q11 Single choice

Given:

java

public class Test {

static int count;

synchronized Test() {

count++;

}

public static void main(String[] args) throws InterruptedException {

Runnable task = Test::new;

Thread t1 = new Thread(task);

Thread t2 = new Thread(task);

t1.start();

t2.start();

t1.join();

t2.join();

System.out.println(count);

}

}

What is the given program's output?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in