This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
three possible changes C1. Declare the main() throws an Exception C2. Declare the Ping.getInt() throws an Exception C3. Wrap the invocation of getInt() in try / catch block.
which change(s) allow the code to compile (choose all that apply) A. Just C1 is sufficient B. Just C2 is sufficient C. Just C3 is sufficient D. Both C1 and C2 are required E. Both C1 and C3 are required F. Both C2 and C3 are required G. All three changes are required
Answer was A and C
My question is why B is considered incorrect when the question states that choose all that apply for successfully compilation. Also the answer in the book states that B is not ncessary so confused..
Please let me know the reason.
thanks a lot!
You Want it.. Get it.......the Right Way...<br /> <br />SCJP 5.0 SCWCD 5.0