Object variables in Java are always references.
Property p1 = new Property(230000, "Estate", 2.0, 2, 3)
This allocated a new Property object on the heap and set p1 to a reference to it.
p1 = some_other_property;
This made p1 now a reference to the same Property referenced by the variable some_other_property
. We copied the reference.
someFunction(p1)
This copied the reference p1
into the argument of someFunction. Notice that none of this manipulation of the reference actually changed the Property object, we just mucked about with references to it.
This also means that you can have multiple references that point to the same underlying object. If you add p1 to an ArrayList twice, then do an operation that mutates the object, both entries in the ArrayList will reflect the change (as both refer to the same thing)
This question provides some related and interesting details:
Is Java "pass-by-reference" or "pass-by-value"?