O'Reilly logo

OCA Java SE 8 Programmer I Certification Guide by Mala Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

interface Jump {}
class Animal implements Jump {}
  1. Jump eJump1[] = {null, new Animal()};
  2. Jump[] eJump2 = new Animal()[22];
  3. Jump[] eJump3 = new Jump[10];
  4. Jump[] eJump4 = new Animal[87];
  5. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required