Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does System.out.println() do?
Think about the difference between print and println.
How would you print 'Hello' and 'World' on the same line?
Remember print keeps them together.
What function does System.out.print() perform?
Think about whether the current line stays or moves.
System.out.printf() is primarily used for?
Recall the formatting needs discussed.
Create a small program that prompts the user for their first and last name, then outputs 'Hello, [First Name] [Last Name]!' using both print and println to separate parts correctly.
Make sure to utilize both print and println to format your output correctly.
Using printf, create a program that calculates and outputs the average of three numbers rounded to two decimal places.
Remember to handle the rounding within your printf statement.
6 more questions in this section. Enroll free to practise them all.
Enroll free