Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.StringTokenizer;

public class Main {
    private static String[] parseCommandStr(String str) {
        StringTokenizer st = new StringTokenizer(str, "|");
        String[] command_arr = new String[st.countTokens()];
        int i = 0;
        while (st.hasMoreElements()) {

            command_arr[i] = (String) st.nextElement();
            i++;
        }
        return command_arr;
    }
}