Java Online Screening Test

Java Online Screening Test

1 / 20

Which of the following is true about volatile in Java?

2 / 20

What will happen if a thread calls the wait() method inside a synchronized block?

3 / 20

What will happen if join() is called on a thread?

4 / 20

What will Optional.ofNullable(null).orElse("Default") return?

5 / 20

Which method is used to schedule a task for execution in ScheduledExecutorService?

6 / 20

What is the default capacity of an ArrayList when initialized with an empty constructor?

7 / 20

Which functional interface does the forEach() method accept?

8 / 20

Which class in Java is immutable by design?

9 / 20

Which Java class is designed for thread-safe counter updates?

10 / 20

Which of the following is true about Java garbage collection?

11 / 20

Which method of ConcurrentHashMap is atomic?

12 / 20

Which Java feature ensures that an object is not modified once it is created?

13 / 20

Which functional interface represents an operation that takes one argument and returns a result?

14 / 20

Which collection class allows concurrent modification by multiple threads?

15 / 20

What does the filter() method in Java Streams do?

16 / 20

Which of the following is not a valid access modifier in Java?

17 / 20

Which interface provides a method to retrieve elements sequentially from a collection?

18 / 20

Which stream operation is terminal?

19 / 20

Which lock mechanism in Java provides explicit control over locking?

20 / 20

Which Java collection class does not allow duplicate keys but allows duplicate values?

Your score is

The average score is 56%

0%

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top