Multiple choice technology programming languages

class JJF3 { public static void main(String args[]) { System.out.print(Integer.toBinaryString(Byte.MAX_VALUE)+","); System.out.print(Integer.toOctalString(Byte.MAX_VALUE)+","); System.out.print(Integer.toString(Byte.MAX_VALUE)+","); System.out.print(Integer.toHexString(Byte.MAX_VALUE)); }}

  1. Prints: 1111111,177,127,7f

  2. Prints: 11111111,377,256,ff

  3. Compile-time error

  4. Run-time error

  5. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Byte.MAX_VALUE is 127. In binary: 1111111 (7 bits). In octal: 177. In decimal: 127. In hexadecimal: 7f. The toBinaryString, toOctalString, toString, and toHexString methods produce these representations separated by commas.