Java Magazine, Nov/Dec 2017
ORACLE COM JAVAMAGAZINE NOVEMBER DECEMBER 2017 92 fix this Let me re emphasize that these questions rely on Java 8 Ill begin covering Java 9 in future columns of course and I will make that transition quite clear when it occurs Question 1 intermediate Given this code int a 012 line n1 int b 12 int c Integer parseInt 012 10 and these statements 1 a b 2 b c 3 a c 4 Line n1 causes a compilation error Which is true Choose one A 4 only B 1 2 and 3 C 1 only D 2 only E 3 only Question 2 intermediate Given this fragment shown with line numbers 14 long i1 1234567890123456789 15 short s1 99 s2 100 s3 s1 s2 16 float pi 314 17 short s 199 Which is true Choose one A Lines 14 and 16 are correct but lines 15 and 17 cause compilation to fail B Lines 14 and 15 are correct but lines 16 and 17 cause compilation to fail
You must have JavaScript enabled to view digital editions.