Given:
2. abstract class Tool { 3. int Count; 4. abstract void getCount(); 5. } 6. public class Hammer { 7. // insert code here 8. }
Which line(s), inserted independently at line 7, will compile? (Choose all that apply.)
getCount()
{ ; }getCount()
{ ; }getCount()
{ ; }getCount()
{ ; }A, B, C, and D are ALL correct.
It's a trick question-you might get something like this on the real exam.
It's easy if you notice that on line 6 the code does NOT say "extends Tool".
If line 6 did say "extends Tool", the correct answer would be A, C, and D.
There are no incorrect answers.