tg-me.com/topJavaQuizExplain/202
Last Update:
How many lines of the code contain compiler errors?
❌ A. 0
✅ B. 1
❌ C. 2
❌ D. 3
❌ E. 4
Explanation:
The first line contains a compilation error. The value 3 is cast to long. The 1 * 2 value is evaluated as int but promoted to long when added to the 3. Trying to store a long value in an int variable triggers a compiler error. The other lines do not contain any compilation errors, as they store smaller values in larger or same-size data types, with the third and fourth lines using casting to do so.
BY Explanations “Top Java Quiz Questions”
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Share with your friend now:
tg-me.com/topJavaQuizExplain/202