Well, the goal is that you cannot assign a parameter with anything
public someClass(T some) { some = null;
Is it helpful? Little. Normally, argument variables are not used. But in some special situations, you may want to do this.
In any case, if some of them are new someClass(mySome) , mySome will never be changed, although inside the function you assign values โโto the argument. There is no such thing as pass-by-refrence in Java. Variables are primitives or references to objects, not to the object itself.
source share