Tag: technology
Questions Related to technology
-
Compilation fails.
-
An exception is thrown at runtime.
-
The code executes and prints "running".
-
The code executes and prints "runningrunning".
-
The code executes and prints "runningrunningrunning".
-
declare reset() using the synchronized keyword
-
declare getName() using the synchronized keyword
-
declare getCount() using the synchronized keyword
-
declare the constructor using the synchronized keyword
-
declare increment() using the synchronized keyword
-
This code may throw an InterruptedException
-
This code may throw an IllegalStateException
-
This code may throw a TimeoutException after ten minutes
-
This code will not compile unless "obj.wait()" is replaced with "((Thread) obj).wait()".
-
Reversing the order of obj.wait() and obj.notify() may cause this method to complete normally
-
A call to notify() or notifyAll() from another thread may cause this method to complete normally
-
Compilation fails.
-
An exception is thrown at runtime.
-
The code executes and prints "StartedComplete"
-
The code executes and prints "StartedComplete0123".
-
The code executes and prints "Started0123Complete".
-
harrier
-
shepherd
-
retriever
-
Compilation fails
-
retriever harrier
-
An exception is thrown at runtime
-
java test
-
java -ea test
-
java test file1
-
java -ea test file1
-
java -ea test file1 file2
-
java -ea:test test file1
-
Alpha a = x;
-
Foo f = (Delta)x;
-
Foo f = (Alpha)x;
-
Beta b = (Beta)(Alpha)x;
-
A, B, C,
-
B, C, A,
-
Compilation fails.
-
The code runs with no output
-
An exception is thrown at runtime.