Implemented Map both in Array base and Link Base in Java