The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

beginer neeeds helppppp!

// Rectangle.java - This program prints the outline of a rectangle with 4 asterisks
// across and 6 asterisks down.
// Input: None.
// Output: Prints the outline of the rectangle.

public class Rectangle
{
public static void main(String args[])
{

final int NUM_ACROSS = 4; // Number of asterisks to print across.
final int NUM_DOWN = 6; // Number of asterisks to print down.
int row; // Loop control for row number.
int column; // Loop control for column number.

// This is the work done in the detailLoop()
for(row=1; row<=NUM_ACROSS; row++){

for(column=1; NUM_DOWN>5; column++){

}
}

// Write a loop to control the number of rows.
// Write a loop to control the number of columns
// Decide when to print an asterisk in every column.

// Decide when to print asterisk in column 1 and column 4.

// Decide when to print a space instead of an asterisk.
System.out.print(" ");
// Figure out where to place this statement that prints a newline.

// This is the work done in the endOfJob() method
System.exit(0);

} // End of main() method.

} // End of Rectangle class.

I dont know how to do the rest they say use an if statement to determine when to print an asterisk so that you can have a rectangle at the end but i cant figure it out im not sure if my loops are even right. can someone explain and show how this is done using this code that is on here. the loops i have added but thats all. in the course im taking this is all that i can use.