1.6: Basic Input/Output (Participation Activity)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/3

Last updated 3:29 AM on 3/22/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

4 Terms

1
New cards

Assuming scnr already exists, which statement gets an input number into variable numCars?

numCars = scnr.nextInt(); (Explanation: The variable numCars will be assigned with the next integer gotten via scnr.nextInt().)

2
New cards

Type a statement that gets an input value into variable numUsers. Assume scnr already exists and numUsers has been declared.

numUsers = scnr.nextInt();

3
New cards

Type a statement that outputs: Hello

System.out.print(“Hello”); (Explanation: The string literal (word in quotations) will the output.)

4
New cards

Type a statement that outputs Hello and then starts a new output line.

System.out.println(“Hello”); (Explanation: println follows the output with a new line. A common error is to type the number "1" or a capital I, as in "in", instead of a lower case l as in "print line".)