Get Last Object In Array Typescript Tutorialspoint Java