last one
package com.codegym.task.task22.task2203;
/*
Between tabs
*/
public class Solution {
public static String getPartOfString(String string) throws StringTooShortException {
if(string ==null) throw new StringTooShortException();
if(string.indexOf("\\t")<0) throw new StringTooShortException();
String result = "";
int i = string.indexOf("\t");
int i2 = string.indexOf("\t",1);
result = string.substring(i+1,i2);
return result;
}
public static class StringTooShortException extends Exception {
}
public static void main(String[] args) throws StringTooShortException {
System.out.println(getPartOfString("\tCodeGym is the best place \tto learn Java\t."));
}
}