logo

Crowdly

What does the following Java code display on the screen? int rows = 4; String ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What does the following Java code display on the screen?

int rows = 4;

String output = "";

for (int i = 0; i < rows; i++)

{

output = output + i;

for (int j = 0; j < i; j++)

output = output + "*";

}

System.out.print(output);

More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!