Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions