Java Programming Quiz

Java Programming Quiz

University

45 Qs

quiz-placeholder

Similar activities

StrukData1

StrukData1

University

40 Qs

G9-JavaScript

G9-JavaScript

9th Grade - University

44 Qs

Quiz 1 PBO

Quiz 1 PBO

University

45 Qs

TECHNICAL QUIZ

TECHNICAL QUIZ

University

45 Qs

standard input output

standard input output

University

41 Qs

JS Lesson 31-72

JS Lesson 31-72

12th Grade - University

40 Qs

AP Java Quiz 1

AP Java Quiz 1

KG - University

50 Qs

Operators in Python

Operators in Python

University

43 Qs

Java Programming Quiz

Java Programming Quiz

Assessment

Quiz

Computers

University

Easy

Created by

Nguyễn Anh Tú

Used 1+ times

FREE Resource

45 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a logical operator in Java?

++

&&

--

**

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way to declare and initialize a variable?

int x 10;

int x = 10;

x = int 10;

10 = int x;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function?

define

method

function

Correct

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way to declare an integer variable?

int = x;

int x;

x int;

declare int x;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a single-line comment?

/* comment */

// comment

/ comment

# comment

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword starts a conditional statement in Java?

for

if

while

switch

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used in switch-case for multiple options?

case

if

default

else

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?