How can we make a HashMap-typed parameter not editable?
<p>Sorry my title may be misleading.</p>

<p>This is actually from one of my recent JAVA interviews, the interviewer asked me this question: if we have a parameter that is of type HashMap, how can we make sure that in the accepting method, there is no way the user can modify this HashMap (i.e., get() method)</p>

<p>I was saying using final during the interview, which the interviewer didn't appreciate at all, and I've searched online for this topic for a while still have no clue.</p>

<p>Could experts help? Thanks</p>
