This code keeps on looping every time I enter something. How to fix it?
public void inputPlayer()
{
Scanner input = new Scanner(System.in);
while(name.length() < 1)
{
System.out.println("Name: ");
this.setName(input.nextLine());
//name = input.nextLine();
if(name.length() < 1)
System.err.println("Must have one or more characters");
}
}
Heres' a screenshot of the whole thing:

this.setNamechanges name (don't know, you haven't given the code), nothing changes the guard condition, so it will never break.