People,
I think this question has a wrong answer in the book.
Given the code:
Question from OCP Java SE 6 Programmer Practice Exams.
Which of the following methods, inserted independently at line 11, compiles? (Choose all that apply).
A. void think() throws Exception { }
B. void think() throws FileNotFoundException { }
C. public void think() { }
D. protected void think() throws IOException { }
E. private void think() throws IOException { }
F. void think() { int x = 7/0; }
My answers are: C, F
Book answers are: B, C, D and F
Could anybody help me to understand what is going on at this question?
Thanks.