Java Programming Quiz

Java Programming Quiz

University

25 Qs

quiz-placeholder

Similar activities

Java Basic - Core

Java Basic - Core

University

20 Qs

Quiz 1-PBO

Quiz 1-PBO

University

20 Qs

Java Coding Questions

Java Coding Questions

University

20 Qs

Java Programming

Java Programming

University

20 Qs

CSE-JAVA-QUIZ-1

CSE-JAVA-QUIZ-1

University

21 Qs

Code Junction 4

Code Junction 4

University

20 Qs

Java Control and Loop -2

Java Control and Loop -2

University

20 Qs

Susulan PBO XIRPL (2021/2022)

Susulan PBO XIRPL (2021/2022)

11th Grade - University

20 Qs

Java Programming Quiz

Java Programming Quiz

Assessment

Quiz

Computers

University

Medium

Created by

LAKSHMI NARAYANA INAMPUDI

Used 1+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?

int a = 5, b = 2;

System.out.println(a + b * 2);

14

9

10

7

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be printed?

int x = 10;

System.out.println(++x);

10

11

9

Error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Avani is trying to name her new Java class for a school project. She wants to choose a name that follows the rules of valid identifiers in Java.

Which of the following names is NOT a valid identifier for her class?

_student

123name

name123

$total

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output?

int x = 5;

int y = 10;

System.out.println(x > y ? x : y);

10

5

true

false

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Aisha is learning programming and comes across several terms.

She needs to identify which of the following is NOT a Java keyword.

this

new

integer

class

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this while loop?

int i = 1;

while(i < 4)

{

System.out.print(i + " ");

i++;

}

0 1 2 3

1 2 3

1 2 3 4

Infinite loop

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

During a coding workshop, Tisha is learning about escape sequences in programming.

She comes across a question about which escape sequence represents a newline.

Can you help her identify the correct one?

\n

\t

\r

\b

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?