Java Programming Quiz

Java Programming Quiz

12th Grade

55 Qs

quiz-placeholder

Similar activities

XIRPL2_PASQUIZZ

XIRPL2_PASQUIZZ

1st Grade - Professional Development

50 Qs

Python Review - PLTW CSE / Codecademy

Python Review - PLTW CSE / Codecademy

9th - 12th Grade

53 Qs

Coding Quiz Challenge

Coding Quiz Challenge

9th - 12th Grade

60 Qs

AP CS 50 CH 1 Review

AP CS 50 CH 1 Review

8th - 12th Grade

56 Qs

Java Day Two

Java Day Two

9th - 12th Grade

60 Qs

Peperiksaan 1

Peperiksaan 1

12th Grade

50 Qs

software dev

software dev

9th - 12th Grade

50 Qs

Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

1st - 12th Grade

52 Qs

Java Programming Quiz

Java Programming Quiz

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Abiodun Asemota

Used 4+ times

FREE Resource

55 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following correctly declares an int variable in Java?

int number = 5.0;

int number = 5;

int number = '5';

int number = true;

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the size of a double data type in Java?

2 bytes

4 bytes

8 bytes

16 bytes

3.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the default value of a boolean data type in Java?

true

false

0

1

4.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following represents a valid char declaration in Java?

char letter = "A";

char letter = 'A';

char letter = 65;

Both B and C

5.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the maximum value that an int data type can hold in Java?

2,147,483,647

4,294,967,295

9,223,372,036,854,775,807

1,000,000

6.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is a valid double literal in Java?

double value = 5;

double value = 5.0;

double value = 5.0f;

double value = "5.0";

7.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which statement correctly compares two boolean variables, a and b, in Java?

if (a = b)

if (a == b)

if (a.equals(b))

if (a != b)

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?