Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. public class Questions
  4. {
  5. public Questions[] loadData(String fileName)
  6. {
  7. Questions[] loadedQuestions;
  8. try
  9. {
  10. String fileNameWithPath = "ExampleFiles/"+fileName;
  11. Scanner dataSource = new Scanner (new FileInputStream(fileNameWithPath));
  12. }
  13. catch( Exception e)
  14. {
  15. System.out.println("The file could not be found");
  16. }
  17. return loadedQuestions;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement