Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 308
  • class D { public static void main (String args[]) { B...

class D { public static void main (String args[]) { Byte a = new Byte("1"); byte b = a.byteValue(); short c = a.shortValue(); char d = a.charValue(); int e = a.intValue(); long f = a.longValue(); float g = a.floatValue(); double h = a.doubleValue(); System.out.print(b+c+d+e+f+g+h); }} What is the result of attempting to compile and run the program?

technology programming languages
  1. Prints: 7

  2. Prints: 7.0

  3. Compile-time error

  4. Run-time error

  5. None of the above


Show answer
Correct Option: C

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy