Author: VenkaTESH POLNEEDI
Exam Permalink:
https://www.jobilize.com/java-certification-questions
Question Permalink:
https://www.jobilize.com/type-mismatch-cannot-convert-from-int-to-byte
Question 255 / 297:  public static void main(String[] args)

{

byte b1= 25;

byte b2=45;

byte b3= b1+b2;

}

A  a)70
B  b)CompileError
C  c)25
D  d)RunTimeException
<< First < Previous Flashcard Next > Last >>
Explanation:

JVM automatically converts the result to the integer,So integer can't store into the byte so,It gets compile error

Exam Home Page
https://www.jobilize.com/java-certification-questions

Oracle Certified Professional Java Programmer

Author:

Access: Public Instant Grading

Ask
Edgar Delgado
Start Test
Subramanian Divya
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>