Search Header Logo

Java Questions & Answers

Authored by Chaya Td

Computers

University

Used 40+ times

Java Questions & Answers
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these selection statements test only for equality?

if

switch

if & switch

none of the above mentioned

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these are selection statements in Java?

if()

for()

continue

break

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of this statement is incorrect?

switch statement is more efficient than a set of nested ifs

two case constants in the same switch can have identical values

switch statement can only test for equality, whereas if statement can evaluate any type of boolean expression

it is possible to create a nested switch statements

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the following Java program?

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid jump statement?

break

goto

continue

return

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The while loop repeats a set of code while the condition is not met?

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is it called if an object has its own lifecycle and there is no owner?

Aggregation

Composition

Encapsulation

Association

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?