Here it what I have, but I just dont know how to store the characters into the array properly.
public static void main(String args[])throws Exception{
Print x = Print();
char[][] sample = a.readFile("sample.txt");
}
public static void readFile([][]){
try{
FileInputStream fstream = new FileInputStream("sample.txt");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while ((strLine = br.readLine()) != null) {
System.out.println (strLine);
}
in.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
This post has been edited by pilaso: 10 October 2011 - 06:52 AM

New Topic/Question
Reply



MultiQuote





|