Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/* 
    
 Date: 26th of Februar 2014
 version 0.1
 All source under GPL version 2 
 (GNU General Public License - http://www.gnu.org/)
 contact traxplayer@gmail.com for more information about this code
    
 */

import java.io.*;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {
    public static ArrayList<String> getInput() {
        ArrayList<String> result = new ArrayList<String>(10);
        String line;
        try {
            line = new BufferedReader(new InputStreamReader(System.in)).readLine();
            if (line != null) {
                StringTokenizer st = new StringTokenizer(line);
                while (st.hasMoreTokens())
                    result.add(st.nextToken());
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return result;
    }
}