I am trying to change the image of a character (Sean) based on the first letter of an instance variable (String name) but I keep getting a nullPointer
this is the method where I get a null pointer
this is an example of how I am trying to use the method
the idea is to change the color of the sheep based on the first letter. the images are named based on the color of the sheep
EX. a red sheep for the first right animation would be rright1.png
public String setImages( String name )
{
return name.substring(0,1);
}private GreenfootImage right1 = new GreenfootImage( setImages(this.name) +"right1.png");
