Is it saved exactly like that? Meaning, are each questions separated by newlines?
Anyway, my Java skills are elementary at best. But maybe this would help.
Code:
import java.io.*;
class FileRead
{
static String[] questions;
public static void main(String args[])
{
try{
// Open file
FileInputStream fstream = new FileInputStream("textfile.txt");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
int i = 0;
//Read File Line By Line
while ((strLine = br.readLine()) != null){
// Save each line in array
questions[i] = strLine;
i++;
}
//Close the input stream
in.close();
}catch (Exception e){
//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
}
This is from what I can remember about java from ~4? years ago. ^^
I currently don't have a java compiler on this box so this is totally untested.
At the very least, this script should contain the correct functions that would point you at the right direction.
Good Luck.
ps. I also remember seeing a java expert around here, somewhere. Maybe he can shed some light on this matter.