Search Header Logo

Java Programming MCQs

Authored by Mohd. Khan

Computers

University

Used 4+ times

Java Programming MCQs
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int

String

float

boolean

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of int in Java?

1

0

null

garbage value

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store a single character?

char

String

byte

boolean

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of a float in Java?

4 bytes

8 bytes

2 bytes

1 byte

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store true or false values?

byte

char

boolean

float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a boolean variable?

true

0

null

false

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is smallest in size?

int

short

byte

long

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?

Discover more resources for Computers