VoltageX
public text v1 · immutablepublic class Quiz6
{
public static void main(String[] args)
{
StringBuffer test = new StringBuffer("");
int n = 5;
for (int i = 1; i <= n; i++)
{
test.append("*");
for (int j = 1; j <= n; j++)
{
if (j > 2)
break;
test.append("*");
}
}
System.out.println("this printed " + test.length() + " stars");
}
}
"How many stars does this print...AAAAARGH"