Created
February 17, 2017 11:39
-
-
Save shah-smit/146913ed8f223b7d6c5df9ca7ebb1ee6 to your computer and use it in GitHub Desktop.
File Reader, its own in JAVA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class filey | |
{ | |
public static void bling(String s)throws Exception | |
{ | |
BufferedReader inone = new BufferedReader(new FileReader(s)); | |
int t = inone.read(); | |
while(t != -1) | |
{ | |
System.out.print((char)t); | |
t=inone.read(); | |
} | |
} | |
public static void main(String[] args)throws Exception | |
{ | |
bling(args[0]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment