Java Primitive Practice

Java Primitive Practice

12th Grade

20 Qs

quiz-placeholder

Similar activities

Java Programming Quiz

Java Programming Quiz

12th Grade

20 Qs

Asas JavaScript

Asas JavaScript

1st Grade - University

18 Qs

Examen de JavaScript

Examen de JavaScript

12th Grade

20 Qs

Variables in RobotC

Variables in RobotC

9th - 12th Grade

15 Qs

Java If/else/ switch

Java If/else/ switch

9th - 12th Grade

20 Qs

Primitive Types

Primitive Types

10th Grade - University

20 Qs

Unity Quiz1

Unity Quiz1

9th - 12th Grade

19 Qs

8525 AQA  GCSE Computer Science 3.7.1 Relational databases

8525 AQA GCSE Computer Science 3.7.1 Relational databases

7th - 12th Grade

16 Qs

Java Primitive Practice

Java Primitive Practice

Assessment

Quiz

Other

12th Grade

Medium

Created by

Angel Ligon

Used 3+ 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?

Discover more resources for Other