Java Primitive Practice

Java Primitive Practice

12th Grade

20 Qs

quiz-placeholder

Similar activities

Exploring the Basics of C Programming

Exploring the Basics of C Programming

11th Grade - University

20 Qs

Test Faham?

Test Faham?

12th Grade - Professional Development

23 Qs

สอบปลายภาค วิชาพื้นฐานการเขียนโปรแกรมคอมพิวเตอร์ (C++)

สอบปลายภาค วิชาพื้นฐานการเขียนโปรแกรมคอมพิวเตอร์ (C++)

12th Grade - University

20 Qs

Examen de JavaScript

Examen de JavaScript

12th Grade

20 Qs

Python - Selection (IF statements)

Python - Selection (IF statements)

9th - 12th Grade

17 Qs

Uji Kompetensi #1 Kelas XII Kompetensi Keahlian Rekayasa Per

Uji Kompetensi #1 Kelas XII Kompetensi Keahlian Rekayasa Per

12th Grade

20 Qs

Python Programming

Python Programming

3rd Grade - University

17 Qs

Java Programming Quiz

Java Programming Quiz

12th Grade

20 Qs

Java Primitive Practice

Java Primitive Practice

Assessment

Quiz

Other

12th Grade

Medium

Created by

Angel Ligon

Used 2+ times

FREE Resource

20 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
boolean
char

Answer explanation

The String data type is not a primitive data type in Java; it is a reference type used to represent sequences of characters.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store whole numbers in Java?

float
double
int
char

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

-2,147,483,648 to 2,147,483,647
-32,768 to 32,767
0 to 4,294,967,295

-2,648 to 2,647

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store characters in Java?

int
float
char
boolean

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

myInteger = 100;

char = 'a';

int myNumber = 10;

int myNumber;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a proper way to declare and initialize a variable in Java?

myInteger = 100;

char = 'a';

int myNumber = 10;

int myNumber;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following variable names follows best practices for naming a variable?

5apples

someVariable

applesnum

numApples

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?