Enter a file name from the console.
Find the maximum byte in the file. Display it on the screen.
Close the IO stream.
Maximum byte
- 10
Locked
Comments (7)
- Popular
- New
- Old
You must be signed in to leave a comment
Devonte A
16 September 2022, 08:44
How do you "Enter a file name from the console"?
0
John Squirrels Website Admin at CodeGym
26 September 2022, 11:43
You can do it after you use this command System.in.
0
DarthGizka
6 June 2021, 13:04
task1801 (Maximum byte) CAVEAT: the task description talks about 'maximum byte value'. Since byte is signed instead of unsigned in Java this means at most 127, with octets > 127 mapping to negative values.
However, my code just passed reporting the maximum of the unsigned byte values returned by read(). Either they fixed the test data so that the difference doesn't matter, or - more likely - they fixed the test to accept either interpretation of 'byte value'.
0
LennyMan
2 January 2021, 16:15
I don t understand what "maximum byte" means in a file. At first i tought was the total of the bytes in that file, but looks like its not
0
Roman
4 January 2021, 09:07
Each byte in the file has a value (for example, 112, 96, etc.), you should find maximum of these values.
+2
Jen P
4 August 2019, 23:50
The question requirement: "The program should display the maximum byte read from the file." actually requests the max bytes read from file for one read action, not the total bytes read from a file.
I am confused: I thought the bytes read from one single read action should always be fixed, for example, it always read 1 byte from a file. I checked official Java document, it also said "Reads **a byte of data** from this input stream". No ?
+3
Sela
3 August 2020, 18:34
right, the requirement is vaguely expressed
0