s = "APPLE".substring( 1, 4 ); // gives "PPL". s = "APPLE".substring( 3, 3 ); // gives "". s = "APPLE".substring( 0, 5 ); // gives "APPLE".