Java Fundamentals – Multiple Choice Quiz

Java Fundamentals – Multiple Choice Quiz

10th Grade

30 Qs

quiz-placeholder

Similar activities

Array and ArrayLists in Java

Array and ArrayLists in Java

10th - 12th Grade

29 Qs

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

10th - 12th Grade

35 Qs

Arrays, Arraylists, 2D Arrays

Arrays, Arraylists, 2D Arrays

9th - 12th Grade

35 Qs

Java Basics Recap

Java Basics Recap

9th Grade - University

25 Qs

Review Arrays

Review Arrays

9th - 12th Grade

32 Qs

Penilaian Tengah Semester

Penilaian Tengah Semester

10th Grade

25 Qs

Ulangan Harian Informatika Kelas 11

Ulangan Harian Informatika Kelas 11

9th - 12th Grade

27 Qs

03 Text Adventure Worksheet

03 Text Adventure Worksheet

9th - 12th Grade

30 Qs

Java Fundamentals – Multiple Choice Quiz

Java Fundamentals – Multiple Choice Quiz

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Ganyaraj Gerthila

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a primitive data type in Java?

String

ArrayList

int

Scanner

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare a double variable with a value of 3.14159?

double piValue = "3.14159";

double piValue = 3.14159;

float piValue = "3.14159";

int piValue = 3.14159;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the key difference between System.out.print() and System.out.printf()?

print() is faster than printf()

printf() is used for formatted output

print() adds a new line after output

printf() is used for input

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement correctly increments a variable x by 1?

x += 1;

x--;

x =+ 1;

x == 1;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a return value in a method do?

It prints a result

It exits the program

It sends a result back to the caller

It initializes an object

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a do-while loop different from a while loop?

It uses an else block

It checks the condition before running the loop

It only runs once

It always runs at least once

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? System.out.print("Good "); System.out.println("Morning!");

Good Morning!

Good

Morning!

Good \n Morning!

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?