Register now or log in to join your professional community.
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.