A way you could do it is:
Use a FileReader to read the file:
FileReader fr = new FileReader("Uvas.txt"); then you could use a BufferedReader to read the text on the file:
BufferedReader br = new BufferedReader(fr);
Then you could use a try-catch statement to read everything and print it out:
try { String text; //you make a new String for text while ((text = br.readLine()) != null) { System.out.println(text); } } catch (IOException ex) { System.out.println("this doesn't work because: " + ex); } } catch (FileNotFoundException ex) { System.out.println(" not found :" + ex); } Again, this isn't the way you do it. but it might help.