Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.io.File;
  2. import java.io.FileNotFoundException;
  3. import java.util.Scanner;
  4.  
  5. public class insertionSort {
  6.  
  7. public static void main(String[] args) {
  8.  
  9. File file = new File("test.txt");
  10.  
  11. try {
  12.  
  13. Scanner sc = new Scanner(file);
  14.  
  15. while (sc.hasNextLine()) {
  16. String i = sc.nextLine();
  17. System.out.println(i);
  18. }
  19. sc.close();
  20. }
  21. catch (FileNotFoundException e) {
  22. e.printStackTrace();
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement