AP COMPUTER SCIENCE A UNIT 1 QUIZ

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

To output:

Hi There

You would need to use:

System.out.______("Hi ");System.out.print("There");

What would correctly replace ______ ?

print

2
New cards

To declare an integer variable x and set it equal to 17 you would type:

int x = 17;

3
New cards

What is the most precise primitive data type for storing decimal values?

double

4
New cards

Assuming that scan is a properly initialized Scanner variable, which of the following correctly inputs a double?

double val = scan.nextDouble();

5
New cards

Which of the following is a legal variable name in Java?

name

6
New cards

Which of the following variable declarations is a correct assignment?

double y = 82;

7
New cards

In Java all output uses the ______ data type.

String

8
New cards

Which of the following is true about primitive data types?

They hold only one piece of data at a time.

9
New cards

Which of the following are primitive data types?

I. double

II. String

III. boolean

I and III only

10
New cards

Put the following data types in order from largest to smallest (in terms of memory used).

String, double, int, boolean