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

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -