Java error when I try to create an object with a constructor with a string parameter [closed]

You already have a String parameter, you can use it as it is, you do not need to create a new one, see:

public Move(String r)
{       
 String move = r;    
}

However, move will only be a local variable, you probably want something different, but that’s another step, which you will need to do after this one.

Browse More Popular Posts

Leave a Comment