Search Header Logo

CS Primitive Types 1

Authored by Christopher Spaulding

Computers

9th - 12th Grade

Used 2+ times

CS Primitive Types 1
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

30 sec • 1 pt

What data type is this new variable?

___ num = 3.14524;

double

int

String

boolean

char

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

double

int

Integer

boolean

dub

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

String strVar = "Hello";

strVar = "World";

strVar = Hello;

String strVar;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

integer

double

String

boolean

character

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store a single letter or symbol in Java?

integer

char

double

String

boolean

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store a sequence of characters/letters/symbols in Java?

integer

char

double

String

boolean

7.

DRAG AND DROP QUESTION

30 sec • 1 pt

What is the proper way to make an if statement?

if ​ ​ (a)   ​ (b)  

System.out.println("x is greater than 5")​ (c)  

​ (d)  

(x > 5)
{
;
}
x > 5
x > 5;
[x > 5]
(
)

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?