Maximum byte

  • 10
  • Locked
Enter a file name from the console. Find the maximum byte in the file. Display it on the screen. Close the IO stream.
You can't complete this task, because you're not signed in.
Comments (7)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Devonte A
Level 18 , Rubery, United Kingdom
16 September 2022, 08:44
How do you "Enter a file name from the console"?
John Squirrels Website Admin at CodeGym
26 September 2022, 11:43
You can do it after you use this command
Level 24 , Wittenberg, Germany
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'.
Level 25 , Lucca, Italy
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
Level 41
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.
Jen P
Level 26
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 ?
Level 20 , Poland
3 August 2020, 18:34
right, the requirement is vaguely expressed