请大家看看我的问题,帮助我解答1下好吗?

解决方案 »

  1.   

    null :    就会抛出空指针异常
    超过范围: IndexOutOfBoundsException 抛出越界异常自己试一试很清楚啊
      

  2.   

    Parameters:
    beginIndex - the beginning index, inclusive.
    endIndex - the ending index, exclusive. 
    Returns:
    the specified substring. 
    Throws: 
    IndexOutOfBoundsException - if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex.摘自JDK帮助文档.