interface Jump {} class Animal implements Jump {}
- Jump eJump1[] = {null, new Animal()};
- Jump[] eJump2 = new Animal()[22];
- Jump[] eJump3 = new Jump[10];
- Jump[] eJump4 = new Animal[87];
- Jump[] eJump5 = new Jump()[12];
Answer: a, c, d
Explanation: Option (b) is incorrect because the right side of the expression is trying to create a single object of the class Animal by using parentheses (). At the same time, it’s also using the square brackets ...
Get OCA Java SE 8 Programmer I Certification Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.