Click here to watch in Youtube :
https://www.youtube.com/watch?v=oL7fVykCUYA&list=UUhwKlOVR041tngjerWxVccw
StreamTokenizerDemo.java
Outputhttps://www.youtube.com/watch?v=oL7fVykCUYA&list=UUhwKlOVR041tngjerWxVccw
StreamTokenizerDemo.java
import java.io.IOException; import java.io.StreamTokenizer; import java.io.StringReader; public class StreamTokenizerDemo { public static void main(String[] args) throws IOException { StringReader stringReader = new StringReader("Peter welcome to India"); StreamTokenizer tokenizer = new StreamTokenizer(stringReader); /* * TT_EOL is used to determine end of line */ while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) { /* * sval-The string value of the token, if the * token was a string (word) */ System.out.println(tokenizer.sval); } } }
Peter welcome to India
https://sites.google.com/site/ramj2eev1/home/javabasics/JavaIODemo_StreamTokenizerDemo_word_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/JavaIODemo_StreamTokenizerDemo_word_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/afab0ff1466aae3a6d02c0935e804f2f099cf483/BasicJava/JavaIODemo_StreamTokenizerDemo_word_App/?at=master
See also:
No comments:
Post a Comment