Advertisement
Guest User

Untitled

a guest
Aug 5th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public static void main(String[] args) {
  2. try {
  3. URL url = new URL("https://www.dropbox.com/s/4zp7dhso5a35zh4/%D0%A2%D0%B5%D0%BA%D1%81%D1%82%20%D1%86%D0%B8%D1%82%D0%B0%D1%82%D1%8B.txt?dl=1");
  4. Scanner scn = new Scanner(url.openStream());
  5. while(scn.hasNextLine()){
  6. String s = scn.nextLine();
  7. System.out.println(s);
  8. }
  9.  
  10.  
  11. } catch (MalformedURLException e) {
  12. // TODO Auto-generated catch block
  13. e.printStackTrace();
  14. } catch (IOException e) {
  15. // TODO Auto-generated catch block
  16. e.printStackTrace();
  17. }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement