do
{
System.out.println("Type another number to continue or type 'End' to end");
end = scan.next();
if("end".equals(end)==false||"End".equals(end)==false)
{
num2 = Integer.parseInt(end);
int j = 0;
while (j < num2)
{
System.out.println(name);
j++;
}
if(j == 0)
{
num2 = 0;
}
}
} while("end".equals(end)==false||"End".equals(end)==false);
The String comparison keeps failing. When you type 'End' or 'end' it tries to parse it into an integer and returns an error. Idk why this is happening.
num2 = Integer.parseInt(end);