public void validate(){
  if (pc < 0 || pc >= instructions.size()) {
    pc=0;
  }
}

public void validate ( ) { if ( pc < 0 || pc >= instructions . size ( ) ) { pc = 0 ; } }
ensure values of the state are valid ones .
