1. public static void main(String args[]) {
  2.  
  3. String endOfSyllabus = "~ End of Syllabus";
  4. Path objPath = Paths.get("2014HamTechnician.txt");
  5. String[] restOfTextFile = null;
  6.  
  7. if (Files.exists(objPath)){
  8.  
  9. File objFile = objPath.toFile();
  10. try(BufferedReader in = new BufferedReader(
  11. new FileReader(objFile))){
  12.  
  13. String line = in.readLine();
  14.  
  15. while(line != null){
  16. line = in.readLine();
  17.  
  18. if(endOfSyllabus.equals(line) ){
  19.  
  20. restOfTextFile = line.split(endOfSyllabus);
  21. }
  22.  
  23. }
  24.  
  25. System.out.println(restOfTextFile[0]);
  26.  
  27.  
  28.  
  29.  
  30. }
  31. catch(IOException e){
  32. System.out.println(e);
  33. }
  34.  
  35. }
  36. else{
  37.  
  38. System.out.println(
  39. objPath.toAbsolutePath() + " doesn't exist");
  40. }
  41.  
  42.  
  43.  
  44. /* Create and display the form */
  45. java.awt.EventQueue.invokeLater(new Runnable() {
  46. public void run() {
  47. new A19015_Form().setVisible(true);
  48. }
  49. });