Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public static int firstPage(String keyword) {
  2. while (keyword != null) {
  3.  
  4. }
  5. }
  6.  
  7. public class KeywordIndex {
  8. public class Keyword {
  9. String keyword;
  10. ArrayList < Integer > pages;
  11. public Keyword(String word, int pageNumber) {
  12. this.keyword = word;
  13. this.pages = new ArrayList < Integer > ();
  14. this.pages.add(pageNumber);
  15. }
  16. public void addpageNumber(int pageNumber) {
  17. this.pages.add(pageNumber);
  18. }
  19. }
  20.  
  21. public static void main(String[] args) throws Exception {
  22. ArrayList < Keyword > myWordList = new ArrayList < Keyword > (); //read line by line
  23. FileReader file = new FileReader("‎⁨⁨Desktop⁩/⁨Homework⁩/COMP 251⁩/Assignments/⁩⁩SampleInput.txt");
  24. BufferedReader br = new BufferedReader(file);
  25. String line = br.readLine();
  26. while (line != null) {
  27. line = br.readLine();
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement