Java Programming - Set 1

Java Programming - Set 1

University

15 Qs

quiz-placeholder

Similar activities

G12_Week7

G12_Week7

12th Grade - University

10 Qs

Computer Hardware

Computer Hardware

University

20 Qs

Java Programming

Java Programming

University

20 Qs

Memahami PBO

Memahami PBO

11th Grade - University

15 Qs

MS Core Java Quiz-1 2023

MS Core Java Quiz-1 2023

University

10 Qs

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

10th Grade - University

10 Qs

Java Quiz2

Java Quiz2

University

11 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

Java Programming - Set 1

Java Programming - Set 1

Assessment

Quiz

Computers

University

Hard

Created by

Raphael Kenyuri

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the Scanner class?

To read input from the console

To perform console output

To declare variables

To compute area

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a constant in Java?

final datatype CONSTANTNAME = value;

datatype variableName;

Scanner input = new Scanner(System.in);

Math.pow(a, b)

3.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following is a valid identifier in Java?

2A

readDouble

MAX_VALUE

4#R

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 5 / 2 in Java?

2

2.5

2.0

2.25

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the range of the byte data type in Java?

-128 to 127

-32768 to 32767

-2147483648 to 2147483647

-9223372036854775808 to 9223372036854775807

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the remainder when 20 is divided by 3?

0

1

2

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of Math.pow(2, 3)?

2

3

8

6

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?