Java Developer Temple
A Single Roof for the Java Developers
Wednesday, March 31, 2010
How do I split a string?
public class StringSplit
{
public static void main(String[] args)
{
String data = "1,srirama, java programmer,50000";
String[] items = data.split(",");
for (String item : items)
{
System.out.println("item = " + item);
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment