Results 1 to 5 of 5
Thread: String spliting
- 01-28-2013, 02:15 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
- 01-28-2013, 02:29 PM #2
Re: String spliting
Go for it! We won't do that for you. Ask specific questions, format your code, include compilation and runtime errors.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 01-28-2013, 03:04 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
Re: String spliting
here is my code:
public static void main(String[] args) {
String str = "abc, def, ghi";
System.out.println("---- Split by comma ',' ------");
StringTokenizer st2 = new StringTokenizer(str, ",");
//when there are still more tokens, place it in the array:
while(st2.hasMoreTokens()) {
String key = st2.nextToken();
System.out.println(key );
}
}
is that clear enough?
- 01-28-2013, 03:09 PM #4
Re: String spliting
Yes, but you didn't format your code and you didn't ask a question.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 01-28-2013, 04:15 PM #5
Member
- Join Date
- Jan 2013
- Location
- INDIA
- Posts
- 18
- Rep Power
- 0
Similar Threads
-
Spliting intgers 07:34
By yosi199 in forum New To JavaReplies: 22Last Post: 03-10-2011, 03:05 AM -
Spliting Large String Data (upto 2 GB)
By piyush@java in forum Advanced JavaReplies: 5Last Post: 01-12-2011, 02:23 PM -
Spliting a string (45 Characters)
By BobAmin in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 11-20-2010, 09:45 AM -
spliting a string and checking each token's format
By Implode in forum New To JavaReplies: 1Last Post: 10-18-2009, 08:41 PM -
Spliting desktop
By nagarte in forum AWT / SwingReplies: 5Last Post: 05-05-2008, 12:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks