Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What do you need to import to use the Scanner class?
Think about where the Scanner class is located.
How do you display 'Hello World' using System.out?
Remember the print statement.
What is the purpose of the Scanner class in Java?
Think of what it does for a program.
True or False: nextInt() can be used to read a full line of text.
What does nextLine() read?
Write a Java program that prompts the user for three favorite hobbies and displays them in a formatted way.
Use nextLine() for reading each hobby.
How would you capture multiple inputs in a loop until the user types 'exit'?
Start with `while (true)` and check for exit within the loop.
5 more questions in this section. Enroll free to practise them all.
Enroll free