Java Magazine, Jan/Feb 2018
ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 104 fix this Question 3 intermediate Given this method public final void doStuff int val point A if val 0 throw new NullPointerException if val 1 throw new IOException if val 2 throw new OutOfMemoryError Which of the following is best A Insert the following at point A throws Exception B Insert the following at point A throws NullPointerException OutOfMemoryError C Insert the following at point A throws IOException OutOfMemoryError SQLException D Insert the following at point A throws IOException E Insert the following at point A throws NullPointerException Question 4 intermediate Given this String s Hello StringBuilder sb new StringBuilder Hello StringBuilder sb2 new StringBuilder Hello line n1 Which is true A Placed at line n1 the following fragment System out println sb sb
You must have JavaScript enabled to view digital editions.