Practice Challenges for Fun
In this lesson, we will go through some exercises to practice what we covered in this chapter.
We'll cover the following...
Quiz
Attempt the following quiz questions and check your understanding of Classes and Objects in Java.
Part 1
1
What one println
statement will display the following tabbed heading?
Name Address City State Zip
A)
System.out.println("Name\nAddress\nCity\nState\nZip");
B)
System.out.println("Name\tAddress\tCity\tState\tZip");
C)
System.out.println("Name\pAddress\pCity\pState\pZip");
D)
System.out.println("Name\cAddress\cCity\cState\cZip");
Question 1 of 30 attempted
Part 2
1.
What does it mean to instantiate an object?
Show Answer
Q1 / Q8
Practice Challenges
Challenge 1: Edit a string
Many programs convert the information provided by the user to a consistent format. For example, ...
Access this course and 1400+ top-rated courses and projects.