أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
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.