Quiz#2: Java

Quiz#2: Java

University

10 Qs

quiz-placeholder

Similar activities

Android Fundamentals - Day 1: Java

Android Fundamentals - Day 1: Java

University - Professional Development

10 Qs

Java Quiz

Java Quiz

University

10 Qs

Threads in C# Quiz

Threads in C# Quiz

University

12 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Java Multithreading_Wrapperclass

Java Multithreading_Wrapperclass

University

15 Qs

oops using java quiz

oops using java quiz

University

15 Qs

Java

Java

University

10 Qs

Quiz#2: Java

Quiz#2: Java

Assessment

Quiz

Computers

University

Hard

Created by

Navya Jain

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Media Image

What will be the output of the following Java code?

32

33

24

25

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which environment variable is used to set the Java path?

MAVEN_Path

JavaPATH

JAVA

JAVA_HOME

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which method must be implemented by a class that implements the Runnable interface?

run( )

start( )

main( )

execute( )

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What does the hashCode( ) method in Java return?

The memory address of the object

The size of the object

An integer representation of the object

A string representation of the object

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the role of the `@FunctionalInterface` annotation in Java?

It allows a class to be used in lambda expressions.

It enforces that the interface has exactly one abstract method.

It makes the interface eligible for serialization.

It automatically generates default methods for the interface.

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What does the `ForkJoinPool` class in Java do?

It provides a thread pool optimized for divide-and-conquer algorithms.

It allows concurrent access to a shared resource.

It synchronizes multiple threads.

It blocks threads until they are explicitly woken up.

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of these packages contains the exception Stack Overflow in Java?

java.system

java.lang

java.util

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?