For Programmers: Free Programming Magazines  


Home > Archive > Java Help > October 2004 > Split a line then print









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Split a line then print
sirikit

2004-10-27, 3:59 pm

I splitted this line "printL 3" using this command:
String [] words = command.split(" ");

How can I now print out "printL"?



Paul Lutus

2004-10-27, 8:57 pm

sirikit wrote:

> I splitted this line "printL 3" using this command:
> String [] words = command.split(" ");
>
> How can I now print out "printL"?


Define "print out". Do you by chance mean:

System.out.println(words[0]);


--
Paul Lutus
http://www.arachnoid.com

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com