Bodkins
Posts: 5
Nickname: bodkins
Registered: Mar, 2002
|
|
Re: Files - reading in characters
|
Posted: Mar 23, 2002 6:32 AM
|
|
How do either read in single characters or convert the strings im capturing in to characters, this seems to be complicated i get a lot of incompatable type errors when changing code so far i gots:
System.out.println("The file is readable, read away!"); BufferedReader in = new BufferedReader(new java.io.FileReader(filename));
line = in.readLine(); for(int i=1; line != null; i ++){ System.out.println( i + ". " + line ); line = in.readLine(); } this works fine for the string part of my program but i also need to get the individual characters any help or links to examples etc would again begreat thanks.
|
|