I have to read some data from a file.
The file contain integers 3, or 4 separated by a single space on one line. for example :
3 4 5 6
3 4 5
3 1 2 6
If there are 4 i have to create a rectangle, and if there are 3 i have to create a triangle.
How can i find if there are 3 or 4. Is in java something : while(not end of the line ){ read}?
Like in pascal while not eoln(f) do. or something like this ?
Thank you!

New Topic/Question
Reply



MultiQuote


|