Java Programming Quiz - unit 1b

Java Programming Quiz - unit 1b

9th Grade

20 Qs

quiz-placeholder

Similar activities

Python básico

Python básico

9th Grade

20 Qs

Python Programming Quiz

Python Programming Quiz

9th Grade

20 Qs

G4 - Exploring Internet (Researching) - T2 (AY 2025-2026)

G4 - Exploring Internet (Researching) - T2 (AY 2025-2026)

4th Grade - University

25 Qs

QUIS BERFIKIR KOMPUTASIONAL

QUIS BERFIKIR KOMPUTASIONAL

9th - 12th Grade

15 Qs

Informatika

Informatika

9th - 12th Grade

20 Qs

Quizzis2

Quizzis2

9th Grade

17 Qs

ÔN TẬP GIỮA HKII TIN HỌC 10

ÔN TẬP GIỮA HKII TIN HỌC 10

9th - 12th Grade

20 Qs

python karışık sorular

python karışık sorular

9th Grade

17 Qs

Java Programming Quiz - unit 1b

Java Programming Quiz - unit 1b

Assessment

Quiz

Information Technology (IT)

9th Grade

Practice Problem

Medium

Created by

Wayground Content

Used 21+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where should the import java.util.Scanner; statement be placed in a Java program?

Inside the main method

At the beginning of the program before the class declaration

At the end of the program

Anywhere in the program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? String text = "Hello, Java!"; int index = text.indexOf("Java"); System.out.println(index);

7

6

5

8

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of y after the following statements? int y = 4; y *= 2;

2

4

6

8

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does \t represent in a string?

A tab space

A new line

A backspace

A space

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will System.out.println("Java".charAt(2)); output?

J

a

v

Throws an error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? String text = "Hello, World!"; char ch = text.substring(7, 12).charAt(2); System.out.println(ch);

W

r

l

o

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to read a double value using a Scanner object?

nextDouble()

getDouble()

readDouble()

inputDouble()

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?