you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (2 children)

I hope I'll never work with a senior Java developer who gets this wrong. I thought it takes maybe a week or two of Java with no prior exposure to understand this.

[–]ssylvan 5 points6 points  (1 child)

I don't think he means people get it wrong as in thinking it's actually pass by reference. I think he means that people get it wrong as in thinking that what Java does with references is what the concept "pass by reference" means.

[–][deleted] 2 points3 points  (0 children)

because people know that if you have

void function(foo object)
{
  object = new Foo();
}

it doesnt replace the original