SHARE
TWEET

Untitled

a guest Oct 12th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top