Java Magazine, May/June 2018
ORACLE COM JAVAMAGAZINE MAY JUNE 2018 89 fix this Which of the following are true Choose two A The classes compile successfully as shown B The classes would compile successfully if the method declaration at line 1 were changed to this public Base doStuff int val throws RuntimeException C The classes would compile successfully if the method declaration at line 1 were changed to this public Sub doStuff int val D The classes would compile successfully if the method declaration at line 1 were changed to this Base doStuff int val throws Exception E The classes would compile successfully if the method declaration at line 1 were changed to this private Base doStuff int val Question 3 advanced Given this code abstract class Stuff int x public Stuff int x this x x public Stuff this 18 public abstract void doStuff Which of the following snippets taken individually compiles Choose two A new Stuff 9 public void doStuff
You must have JavaScript enabled to view digital editions.