What would the program do if the user asked for a negative number of stars per line?

A good answer might be:

Each line would consist of nothing but the carriage return character that System.out.println() prints. The inner loop would not execute even once.

Live Code!

For your amusement and entertainment here is a JavaScript version of the program:

How Many Rows: How Many Stars:

QUESTION 21:

On a clear evening, out in the country, far from city lights, about 6,000 stars are visible. Enter values so the program prints that many stars.