Search Header Logo

ict5_mt_w2_sw2

Authored by JB Presa

Computers

12th Grade

Used 1+ times

ict5_mt_w2_sw2
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

A program needs to store the number of students in a class. What is the most appropriate data type?

double

int

String

char

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You need to store the average grade of a student (e.g., 91.5). Which data type should you use?

int

double

char

boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You want to store whether a student is enrolled or not. What data type is best?

boolean

char

String

int

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

String

Array

boolean

Scanner

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You want to store a person’s middle initial. Which is the correct data type?

String

char

int

double

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You are writing a program that stores the message “Welcome to Java!”. Which data type will you use?

char

boolean

String

int

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You declared: float price = 12.99; — What is wrong with this code?

Float cannot store decimals

Missing f after the value

price is a reserved word

Value must be in quotes

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?