Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 611 Bytes

74d2.md

File metadata and controls

15 lines (8 loc) · 611 Bytes

Back to questions

74d2: Exceptions and inheritance (i)

Consider the following Java classes:

A.java

B.java

Do these classes compile? Explain your answer. If not, what should you change to make them compile?

In the above classes (fixed to compile, if necessary), what will be the effect of replacing the empty body of foo() in B with the single statement: super.foo()? Will this cause compilation problems? If so, how should you fix them?