bt1942
asked on
Please check this code if it's right.
The question is:
The output to the screen (console/terminal window) produced by the running the following code?
and the answer would be : "****" without double quotation marks.
is this right?
The output to the screen (console/terminal window) produced by the running the following code?
and the answer would be : "****" without double quotation marks.
is this right?
public void printStars()
{
int n = 4;
String s = "****";
for(int row = 1; row<= n; row++)
{
System.out.println(s);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, use system.out.println to add a new line after the output and use system.out.print to leave the cursor at the end of the output so that the next output will be suffixed immediately after the first.
ASKER
Thanks for the comment!
ASKER
what code makes them become 4rows?
Is it the int n = 4;