想打印出存储的信息。我该如何解决这个问题?
public class schoolTimeTable {
private static ArrayList<String> timesArray = new ArrayList<String>();
public static void main(String[] args) {
Scanner scanner = null;
try {
File file = new File("C:/Users/Tommy/workspace/Prov/src/TestPaket/text.txt");
scanner = new Scanner(file);
while(scanner.hasNextLine()){
String[] tokens = scanner.nextLine().split("\\s+");
String[] times = tokens;
for(String time: times)
timesArray.add(time);
System.out.println(timesArray);
}} catch (Exception e) {
// TODO: handle exception
}
}}