Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Complete the following java code : . . . . . [ ] H = new . . . .[3]; H[0] = new Emp[ ]; H[1] = new Manager[ ]; H[2] = new String(" Eng Hany " );

user-image
Question added by Hany Abd El-Latif Attia Abd El-Hay , متدرب , iteshare
Date Posted: 2014/07/31
Dan Nemes
by Dan Nemes , Software developer , CGS Europe

Object [ ] H = new Object [3]; H[0] = new Emp(); H[1] = new Manager(); H[2] = new String(" Eng Hany ");

 

Actually the object instantiation "new Emp[]" and "new Manager[]" was also wrong.

Correct form is "new Emp()", using () instead of []. I don't know if this was an intended mistake or not.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.