Question: Write a Java program that prints out the first names of three of your friends in two columns. Remember to first store their names in

Write a Java program that prints out the first names of three of your friends in two columns. Remember to first store their names in separate variables. Start each line by the line number starting from 1, which is stored in a variable and change it whenever needed.

Hint: Same as in C, you can declare an integer variable to store the line number in it and increase it by 1, exactly same as that in C. For the tab space between the line number and name, again use the same specifier you used in C, by \t inside the printout statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!