NicholasCSW

SortProject1

Apr 3rd, 2017
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1.  
  2. /**
  3.  * Write a description of class SortProject here.
  4.  *
  5.  * @author Ulizio
  6.  * @version 1
  7.  */
  8. public class SortProjectStrings
  9. {
  10.     public static void main(String [] args) {
  11.        
  12.         try {
  13.            
  14.             int size = 0;
  15.            
  16.             Scanner scan = new Scanner(new BufferedReader(new FileReader("words.txt")));
  17.             //scan.useDelimiter(",");
  18.             //The delimiter is a coma with no space, so we will sep. nums with just a comma.
  19.             //Create and prep the scanner
  20.             while(scan.hasNext()) {
  21.              size++;
  22.              //System.out.println(scan.nextDouble());
  23.             }
  24.            
  25.         } catch(Exception e) {
  26.             System.out.println(e.getMessage());
  27.         }
  28.        
  29.        
  30.     }
  31. }
Add Comment
Please, Sign In to add comment