1. An anonymous class can be defined…
a) With new public attributes that are globally accessible.
b) With methods that over-ride methods.
c) With more then one instance
d) Only when the parent class has a default constructor.
2. When encapsulating code in a “try” block of a”try-catch-statement”…
- the argument(s) passed to a “catch” block must only be of thetype(s) of the exceptions thrown by methods invoked in the “try”block.
- the argument(s) passed to the “finally” block must be of thetype(s) of the exceptions thrown in the “try” block
- the argument(s) passed to a “catch” block must be of thetype(s) of the exceptions thrown in the “try” block
Answer
1.a)
OR
OR