Click here to watch in Youtube :
https://www.youtube.com/watch?v=IntmnUJ-4Pg&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java IO (StringReader) |
Java Tutorial : Java IO (StringReader) |
import java.io.StringReader; public class StringReaderDemo { public static void main(String[] args) throws Exception { StringReader stringReader = null; try { String str = "Hello"; stringReader = new StringReader(str); int data; while ((data = stringReader.read()) != -1) { System.out.print((char) data); } } finally { if (stringReader != null) { stringReader.close(); } } } }Output
HelloRefer:
https://docs.oracle.com/javase/8/docs/api/index.html?java/io/StringReader.html
https://sites.google.com/site/ramj2eev1/home/javabasics/JavaIODemo_StringReader_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/JavaIODemo_StringReader_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/301d989d72a8b053f20342cfe0bd4a5c143c23aa/BasicJava/JavaIODemo_StringReader_App/?at=master
See also:
No comments:
Post a Comment