aspose file tools*
The moose likes Beginning Java and the fly likes StringTokenzier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "StringTokenzier" Watch "StringTokenzier" New topic
Author

StringTokenzier

kalai sundar
Ranch Hand

Joined: May 25, 2005
Posts: 69
26
0,1,1,N,N,N,N
0
24
6,88,Y,N,Y,N
4,88,Y,N,Y,N
2,88,Y,N,Y,N
1,88,Y,N,Y,N
3,88,Y,N,Y,N
5,88,Y,N,Y,N
6,86,Y,N,Y,N
4,86,Y,N,Y,N
2,86,Y,N,Y,N
1,86,Y,N,Y,N
3,86,Y,N,Y,N
5,86,Y,N,Y,N
6,84,Y,N,Y,N
4,84,Y,N,Y,N
2,84,Y,N,Y,N
1,84,Y,N,Y,N
3,84,Y,N,Y,N
5,84,Y,N,Y,N
6,82,Y,N,Y,N
4,82,Y,N,Y,N
2,82,Y,N,Y,N
1,82,Y,N,Y,N
3,82,Y,N,Y,N
5,82,Y,N,Y,N
17
16,0.0000,0.0000,0.0000,0.0000,0.0000
14,0.0000,0.0000,0.0000,0.0000,0.0000
12,0.0000,0.0000,0.0000,0.0000,0.0000
10,0.0000,0.0000,0.0000,0.0000,0.0000
8,10.000,10.000,8.700,0.0000,300.000
6,10.000,10.000,8.700,0.0000,300.000
4,10.000,10.000,8.700,0.0000,300.000
2,10.000,10.000,8.700,0.0000,300.000
0,10.000,10.000,8.700,0.0000,300.000
1,10.000,10.000,8.700,0.0000,300.000
3,10.000,10.000,8.700,0.0000,300.000
5,10.000,10.000,8.700,0.0000,300.000
7,10.000,10.000,8.700,0.0000,300.000
9,0.0000,0.0000,0.0000,0.0000,0.0000
11,0.0000,0.0000,0.0000,0.0000,0.0000
13,0.0000,0.0000,0.0000,0.0000,0.0000
15,0.0000,0.0000,0.0000,0.0000,0.0000


The above thing is my text file,using StringTokenizer class i got all the tokens

StringTokenizer st = new StringTokenizer (newval, " ");
while(st.hasMoreTokens()){
String sg = st.nextToken();
System.out.println("The value of token"+sg);
}

here in newval only the above mentioned text file value is there, so by String sg = st.nextToken(); i will get each tkne, now vat i want identify 4'rd token, here the 4'rd token is 1, like that i wnat to identify so many toknes, in that file how i can do it,

anyone help me
KALAI
madhup narain
Ranch Hand

Joined: Dec 14, 2004
Posts: 148
please use complete words !! its really hard to understand 'vat' and '4rd'..makes the work harder for the reader.


Money for nothing and Java for Free
SCJP, SCWCD
Ashok George
Ranch Hand

Joined: Mar 25, 2005
Posts: 87
couldn"t exactly get wat the question meant!!! please repeat!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StringTokenzier