What is the result of compiling and running the following program? Select the one correct answer. (a)
Question:
What is the result of compiling and running the following program?
Select the one correct answer.
(a) The program will not compile, because a byte value cannot be assigned to an int variable without using a cast.
(b) The program will compile, and print 128 at runtime.
(c) The program will not compile, because the value 128 is not in the range of values for the byte type.
(d) The program will compile, but will throw a ClassCastException at runtime.
(e) The program will compile, and print 255 at runtime.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Programmers Guide To Java SE 8 Oracle Certified Associate OCA
ISBN: 9780132930215
1st Edition
Authors: Khalid Mughal, Rolf Rasmussen
Question Posted: