Search Header Logo

Java Programming Quiz

Authored by Cherry Anne Tabaosares

Information Technology (IT)

10th Grade

Used 2+ times

Java Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is the correct way to declare a variable in Java?

int number;

num int;

integer number;

number int;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create a class in Java?

object

class

Class

create

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct file extension for Java source files?

.jav

.java

.class

.jar

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed by the following code? System.out.println(3 + 2);

3+2

5

32

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used for decimal numbers in Java?

int

float

char

boolean

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used for single-line comments in Java?

//

/* */

#

--

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is the entry point of a Java program?

start()

run()

main()

program()

Access all questions and much more by creating a free account

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

Already have an account?