tjb1

Untitled

Nov 23rd, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. double lineCount = 0;
  2. String file = "";
  3.  
  4. public StringBuffer displayHead() {
  5. Scanner input = new Scanner(filename);
  6. StringBuffer file = new StringBuffer("");
  7. while(input.hasNext() || lineCount<=5){
  8. file.append(input.nextLine());
  9.  
  10. lineCount++;
  11. }
  12.  
  13. return file;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment