Java Programming Language Fundamentals

419 questions in the bank
Are you ready to take quiz?
Explore more
Logo
About the Quiz

Quiz will ask 20 randomly selected questions with allotted time of . You can take the quiz more than once. Once you submit the quiz, you can review how you have done, the correct the answers for each questions and the explanation for the correct the answer.

INR100.00
INR1000.00
Unlimited Attempts   (lifetime access)

Try your first attempt for free.

Quiz Topics

9 Modules

Core Java Concepts

6 topics
1.

Arrays

10 questions
2.

Control Statements

10 questions
3.

Data Types

10 questions
4.

Exception Handling

10 questions
5.

Operators

10 questions
6.

Strings

10 questions

Object-Oriented Programming (OOP)

6 topics

Java Collections Framework

6 topics

Java Concurrency

6 topics

Java I/O

6 topics

Java 8 Features

6 topics

Design Patterns

5 topics

Java Development Tools

6 topics

Java Frameworks

6 topics
Sample questions

What will be the output of the following code?

int[] arr = {1, 2, 3, 4, 5};
System.out.println(arr[5]);

1

ArrayIndexOutOfBoundsException

5

Compilation Error

Which of the following statements about arrays in Java are true?

Arrays can hold primitive types and objects.

The size of an array is fixed after it is created.

Arrays in Java are zero-indexed.

You can change the size of an array dynamically.

What will be the output of the following code?

int[] arr = new int[5];
for(int i = 0; i < arr.length; i++) {
    arr[i] = i * 2;
}
System.out.println(arr[2]);

0

1

2

4

Which of the following methods can be used to copy an array in Java?

System.arraycopy()

Arrays.copyOf()

clone()

copy()

What is the result of the following code?

int[] arr = {1, 2, 3};
int[] arr2 = arr;
arr2[0] = 10;
System.out.println(arr[0]);

1

2

3

10

INR100.00
INR1000.00
Unlimited Attempts   (lifetime access)

Try your first attempt for free

Signup to add this to cart.

Quiz Topics

9 Modules

Core Java Concepts

6 topics
1.

Arrays

10 questions
2.

Control Statements

10 questions
3.

Data Types

10 questions
4.

Exception Handling

10 questions
5.

Operators

10 questions
6.

Strings

10 questions

Object-Oriented Programming (OOP)

6 topics

Java Collections Framework

6 topics

Java Concurrency

6 topics

Java I/O

6 topics

Java 8 Features

6 topics

Design Patterns

5 topics

Java Development Tools

6 topics

Java Frameworks

6 topics