Q:

How far does a Scanner can read (in Java)? Can I modify it bigger?

I need to input an array of String (very large Strings, about 3000 characters per String). But when I read my input by Scanner, it didn't read all of them. For example, with 100 lines input, it only read to 63rd lines
This is what I got when run it on ideone: http://ideone.com/57uugH
Here is my code:
public class main {
public static void main(String[] args) {
    try {
        String s;
        int t;
        ArrayList<String> al = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        t = Integer.parseInt(sc.nextLine());
        try {
            while (sc.hasNextLine()) {
                sc.reset();
                s = sc.nextLine();
                al.add(s);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("Numbers of Index in Arraylist: " + al.size());
    } catch (Exception e) {
        e.printStackTrace();
    }
}

}

A:

Your input has 62 lines and 186 words (61 and 185 excluding first line). If you want to read all words you can use this:
String s;
int t;
ArrayList<String> al = new ArrayList<>();
Scanner sc = new Scanner(new InputStreamReader(System.in));
t = sc.nextInt();
try {
    while (sc.hasNext()) {
            s = sc.next();
            al.add(s);
    }
} catch (Exception e) {
    e.printStackTrace();
}

In this case your t is not used. If you want to read not more than t (100) words then try this:
String s;
int t;
ArrayList<String> al = new ArrayList<>();
Scanner sc = new Scanner(new InputStreamReader(System.in));
t = sc.nextInt();
try {
    while (sc.hasNext() && t-->0) {
            s = sc.next();
            al.add(s);
    }
} catch (Exception e) {
    e.printStackTrace();
}

