public static int addToConstantPool(String s){
  int i=constantPool.indexOf(s);
  if (i < 0) {
    constantPool.add(s);
    return constantPool.size() - 1;
  }
  return i;
}

public static int addToConstantPool ( String s ) { int i = constantPool . indexOf ( s ) ; if ( i < 0 ) { constantPool . add ( s ) ; return constantPool . size ( ) - 1 ; } return i ; }
adds the given string to the hardcoded constant pool strings returns the offset in the pool
