Java Questions & Answers

Java Questions & Answers

University

10 Qs

quiz-placeholder

Similar activities

C Language Quiz-1

C Language Quiz-1

University - Professional Development

15 Qs

Principles of Programming Languages

Principles of Programming Languages

University

15 Qs

Java History Characteristics Environment

Java History Characteristics Environment

University

12 Qs

Python Programming - Introduction

Python Programming - Introduction

University

15 Qs

Principles of Programming

Principles of Programming

KG - University

13 Qs

Comparing Python, Java, and JavaScript

Comparing Python, Java, and JavaScript

9th Grade - University

15 Qs

Java Quiz#0(Fundamentals)

Java Quiz#0(Fundamentals)

University

10 Qs

Visual Basic Intro

Visual Basic Intro

University

10 Qs

Java Questions & Answers

Java Questions & Answers

Assessment

Quiz

Computers

University

Medium

Created by

Chaya Td

Used 40+ times

FREE Resource

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

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?