An example i wrote to show you to read a file in java using the Scanner class
GeSHi (java):
Scanner version:
public class ReadLineDemo {
public static void main
(String[] args
){ ReadLineDemo EDS = new ReadLineDemo();
EDS.readFile();
}
public void readFile(){
try {
Scanner sc = new Scanner(fr);
while(sc.hasNext()){
str = sc.nextLine();
}
}
e.printStackTrace();
}
}
}
Created by GeSHI 1.0.7.20