1/3
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
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().)
Type a statement that gets an input value into variable numUsers. Assume scnr already exists and numUsers has been declared.
numUsers = scnr.nextInt();
Type a statement that outputs: Hello
System.out.print(“Hello”); (Explanation: The string literal (word in quotations) will the output.)
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".)