View Single Post
Old 03-02-2008, 22:10   #2
k0nt3
Senior Member
 
Iscritto dal: Dec 2005
Messaggi: 7260
magari il codice mettilo tra i tag CODE e /CODE
comunque è naturale che il risultato è sbagliato infatti system.in.read legge solo un byte
http://java.sun.com/javase/6/docs/api/
Quote:
read
public abstract int read()
throws IOException
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
prova a dare un'occhiata qui http://java.sun.com/docs/books/tutor...ial/io/cl.html
k0nt3 è offline