public String substring(String subject,int start,int stop){
  if (stop == -1 || stop >= subject.length()) {
    return subject.substring(start);
  }
  return subject.substring(start,stop);
}

public String substring ( String subject , int start , int stop ) { if ( stop == - 1 || stop >= subject . length ( ) ) { return subject . substring ( start ) ; } return subject . substring ( start , stop ) ; }
get a substring from a string
