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
Get step-by-step solutions from verified subject matter experts
