# pass-by-value
you are using copy of variable (in method)
changes to this copy doesn't affect original variable
in case of reference type: using "." for member access is not considered as change to variable, it is change to referenced object (be careful here).
# pass-by-reference
variable passed by reference doesn't create copy of original variable, it creates alias, which reflects changes to original value
you don't need to worry with pass-by-reference in
Java, everything is passed by value