java - how to initialize hashmap on class level without using static block -
i want initialize 1 hashmap, don't want use constructor way, neither want initialize in static block. can please tell me how that?
public classname() { idtoskillres = new hashmap(); }
i don't want use in these way
you can declare instance member on top , initialise right away.
map<type,type> idtoskillres = new hashmap<type,type>(); public classname() { }
that not constructor, neither static block.
Comments
Post a Comment