Android Build an Interactive Story App The Model-View-Presenter Pattern Creating a Data Model

please help, i cant find my mistake

hel

Spaceship.java
public class Spaceship{
public String shipType;

   public String getShipType() { 
    return shipType;
   }
   public void setShipType(String shipType) {
     ShipType = ShipType; 
  }
}

2 Answers

Daniel Szepanski
PRO
Daniel Szepanski
Pro Student 5,098 Points

Hi,

 public void setShipType(String shipType) {
     ShipType = ShipType; 
  }

your variable is Uppercase try ...

 public void setShipType(String shipType) {
     this.shipType = shipType; 
  }

this should work ;)

thanks, i was also missing that "this." it worked