View Single Post
Old 25-03-2009, 14:14   #5
banryu79
Senior Member
 
L'Avatar di banryu79
 
Iscritto dal: Oct 2007
Città: Padova
Messaggi: 4131
Quote:
Originariamente inviato da PGI-Bis Guarda i messaggi
Leggi il file di testo tutto in una volta.

Codice:
Scanner in = new Scanner(il file txt).useDelimiter("\\Z");
try {
    String fullText = in.next();
} finally {
    in.close();
}
Buono a sapersi...
Cos'è la stringa passata come parametro al metodo useDelimiter()? Una regular expression?
__________________

As long as you are basically literate in programming, you should be able to express any logical relationship you understand.
If you don’t understand a logical relationship, you can use the attempt to program it as a means to learn about it.
(Chris Crawford)
banryu79 è offline   Rispondi citando il messaggio o parte di esso