• + 1 comment
    String string[] = new String[T];
    

    There is no reason for you to do this. You can read the next line directly into a String variable, without needing to create a new instance of the class String.