Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
- import java.io.IOException;
- import java.net.URI;
- import java.net.URISyntaxException;
- import java.nio.file.Files;
- import java.nio.file.Path;
- import java.nio.file.Paths;
- public class main {
- public static void main(String[] args) throws URISyntaxException {
- /*
- * byte[] a = new byte[10];
- *
- * int b,c; b = 10; c = b >> 1; //a[1]= a[0] >> 1; a[0] = 4;
- * System.out.println(a[0]);
- */
- /*URI uri = new URI("D:\\in.txt");
- Path path = Paths.get(uri);
- try {
- byte[] data = Files.readAllBytes(path);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }*/
- FileReader fr;
- try {
- fr = new FileReader("D:\\in.txt");
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- BufferedReader br = new BufferedReader(fr);
- String s;
- while ((s=br.readLine()) !=null)
- System.out.println(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement