Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. %%%%%%%
  2. %Q%&%%%
  3. %%%&&&%
  4. %&%&%%%
  5. %&%&%%%
  6. %&%&&7%
  7. %&%%%&%
  8. %&&&%&%
  9. %%%&&&%
  10.  
  11. String theString = "";
  12. File fd = new File("input.txt");
  13. Scanner sc = new Scanner(fd);;
  14. theString = sc.nextLine();
  15. try {
  16. sc = new Scanner(fd);
  17. } catch (FileNotFoundException e) {
  18. System.out.println("File not found! Application terminatedn" + e.toString());
  19. return;
  20. }
  21.  
  22. while (sc.hasNextLine()) {
  23. theString = theString + "n" + sc.nextLine();
  24. }
  25. sc.close();
  26. char[][] charArray= theString.toCharArray();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement