I am new to java and I've come across this question: in C/C++ we have const modifier which makes function parameters Immutable, Therefore user is confident that the arguments they pass wont change.
But I could not find the same thing in java. Sure final modifier makes the field assignable only once and it works fine to some extent. But what about Objects that I need to modify before sending?(I could make a final copy of the Object but I don't find it good enough. correct me if I'm wrong). what about Object's fields? how we can pass an Object in a way that we would be confident of the integrity of the Object?