Hi Marc,
I am explaining the things what i am understanding with this code,so i hope you will able to understand my problem.
In method(Fizz x, Fizz y) f1, f2 are passed.
Since f1 is marked as final,so we can't change the
value of f1.
but in method, method(Fizz x, Fizz y)
f1 is passed to x, so final Fizz z = x means final Fizz z = f1.
So z.x = 6 shouldn't be changed as it is assigned as final.
Why the code is not giving the compile time error.Since final variable can't be changed.
One thing more which i am doubtful is how final object works, because here its not a final variable its a final object(final Fizz f1 = new Fizz();)?
Because i know about final variable, final method and final class.