You are viewing a single comment's thread. Return to all comments →
I thought static block was mainly used to initialize variables. It gives error if I add declaration in static block. Any Suggestions?
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Java Static Initializer Block
You are viewing a single comment's thread. Return to all comments →
I thought static block was mainly used to initialize variables. It gives error if I add declaration in static block. Any Suggestions?