I have to read inputs from a file which consists of pipe delimetered strings
A|UK|2|1
B||3|1
StringTokenizer st = new StringTokenizer(data,"|");
String id=st.nextToken();
String country=st.nextToken();
String count=st.nextToken();
String flag=st.nextToken();
for the second line of file,There is a empty content,i want to assign "" string if there is no content,how do i do this using nextToken?
Thank you