Skip to content

Instantly share code, notes, and snippets.

@fermopili
Created March 19, 2017 12:27
Show Gist options
  • Save fermopili/203579df7a5db9b8a63c022c27607314 to your computer and use it in GitHub Desktop.
Save fermopili/203579df7a5db9b8a63c022c27607314 to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1318
/*
Чтение файла
*/
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