I have a StreamTokenizer ( t ) iterating over a *.txt file and I am having
trouble in catching words I am searching for ...
Some lines have obviously been left out for clarity.
System.out.prin tln( t.sval ); // This line works perfectly
System.out.prin tln( t.sval.toString ); // As does this one
If I evaluate ( t.sval.toString .getClass ), I get a String class reported.
But these line don't work even though the "String" is in the *.txt file, all
I get is false for every word
t = = "word"
t.sval = = "word" // Return me a boolean
t.sval.toString = = "word"
How do I match a String to my required String?
Thanks in advance
Newsey
trouble in catching words I am searching for ...
Some lines have obviously been left out for clarity.
System.out.prin tln( t.sval ); // This line works perfectly
System.out.prin tln( t.sval.toString ); // As does this one
If I evaluate ( t.sval.toString .getClass ), I get a String class reported.
But these line don't work even though the "String" is in the *.txt file, all
I get is false for every word
t = = "word"
t.sval = = "word" // Return me a boolean
t.sval.toString = = "word"
How do I match a String to my required String?
Thanks in advance
Newsey
Comment