Created
March 19, 2017 12:27
-
-
Save fermopili/203579df7a5db9b8a63c022c27607314 to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1318
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
/* | |
Чтение файла | |
*/ | |
public class Solution { | |
public static void main(String[] args) throws IOException | |
{ | |
// напишите тут ваш код | |
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); | |
String name = reader.readLine(); | |
Scanner scanner=new Scanner(new FileInputStream(name)); | |
while(scanner.hasNextLine()) | |
{ | |
String data=scanner.nextLine(); | |
System.out.println(data); | |
} | |
scanner.close(); | |
reader.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment