View Single Post
  #1 (permalink)  
Old 07-31-2007, 05:52 AM
baltimore baltimore is offline
Member
 
Join Date: Jul 2007
Posts: 40
baltimore is on a distinguished road
Help with a word, if it is divided by spaces
Hi, I am having a problem with this java program i am making. So far it is suppose to just get a command and break it down into a list where each part is a word so it is divided by spaces. But i am having problems so far this is what i have.

Code:
import java.io.*; public class Command { private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); private static String uR,con,sub1; private static[] String test; private static int a,b; public static void main(String[] args) throws Exception { while(true) { b= -1; File data = new File("C:/"); System.out.print(data+">"); uR = in.readLine(); System.out.println(uR); if(uR.equals("exit")) { System.exit(0); } } } }
All i have to figure out is how to break uR up and into test. Any help?
Thanks.
Reply With Quote
Sponsored Links