hashmap - How to Override the get method of Tree Map in Java -
i have treemap. key , value bean of student has 2 fields: regno
, name
.
if have reg no of student, how can override method of tree map fetch value bean of student?
you don't need override in treemap
; need change how use it. have regno key , student value, i.e. treemap<integer, student>
, assuming regno
integer. can call get
regno , retrieve student.
Comments
Post a Comment