Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It depends on which definition of "reference" you are talking about.

Pass-by-reference and C++ references are basically the same - aliasing without requiring dereferencing via an operator.

Java object references are like C++ pointers.

Java is pass-by-value (no aliasing) for all values (ints, bools, object references etc). Java has no object values.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: