CharSequence (int start, int end) { if (start == 0 && end == 1) return this; if (start < 0) throw new IndexOutOfBoundsException("Start index out of range:" + start); if (end > 1 || end < 0) throw new IndexOutOfBoundsException("End index out of range:" + end); if (start > end) throw new IndexOutOfBoundsException("Start index should be less or equal to end index:" + start + " - " + end); return ""; }