Java New Object Array In Typescript Interview Question