Search:

Type: Posts; User: Parranoia

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    1,354

    [SOLVED] Re: 2 Lines Stuffs.

    Use a while loop to get the tokens instead.



    ArrayList<Integer> numbers = new ArrayList<Integer>();

    while(st.hasMoreTokens()) {
    numbers.add(Integer.parseInt(st.nextToken()));
    }
  2. Replies
    9
    Views
    1,354

    [SOLVED] Re: 2 Lines Stuffs.

    Simple. Use the StringTokenizer class :P
    StringTokenizer (Java 2 Platform SE v1.4.2)
  3. Replies
    9
    Views
    1,354

    [SOLVED] Re: 2 Lines Stuffs.

    Couldn't you simply just store the entire line in a String object, tokenize the string, parse each token into an integer, then determine the number of times each number occurs?
Results 1 to 3 of 3