• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StringTokenzier

 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please use complete words !! its really hard to understand 'vat' and '4rd'..makes the work harder for the reader.
 
Ashok George
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
couldn"t exactly get wat the question meant!!! please repeat!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic