JAVA Trial Simulation

Java is a general-purpose programming language that is class-based, object-oriented. It is designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them.
These questions will give you basic idea for Examinations Preparation and/or interview on Java
● Language Fundamentals
● Operators and Assignments
● Exceptions
● Inner Classes
● Garbage Collections
● Java.lang Class
● Declarations and Access Control
● Flow Control
● Objects and Collections
● Threads
● Assertions

0%
0

JAVA Trial Simulation

  1. This digital Marketing Trial Simulation consists of 10 questions only.
  2. Time Limit- 15 min.
  3. The decision of the quiz-master will be final and will not be subjected to any change.
  4. The participants shall not be allowed to use mobile or other electronic instruments.
  5. The questions shall be in the form of multiple-choice, True / False statement, Specificanswer question, etc

1 / 10

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?

2 / 10

Assume the following method is properly synchronized and called from a thread A on an object B:

wait(2000);

After calling this method, when will the thread A become a candidate to get another turn at the CPU?

3 / 10

Suppose that you would like to create an instance of a new Map that has an iteration order that is the same as the iteration order of an existing instance of a Map. Which concrete implementation of the Map interface should be used for the new instance?

4 / 10

 

Where will be the most chance of the garbage collector being invoked?

Question Image

5 / 10

What will be the output of the program?

 

Question Image

6 / 10

What will be the output of the program?

 

 

Question Image

7 / 10

What will be the output of the program?

 

 

Question Image

8 / 10

What will be the output of the program?

String s = "ABC";

s.toLowerCase();

s += "def";

System.out.println(s);

9 / 10

What is the numerical range of char?

10 / 10

Which statement is true?

Question Image

Your score is

We would love to see your feedback