3 ms·
It is definitely emotional for me: I remember reading yet another of these "java is not pass by reference" posts, and the title stuck for some reason. So next t
by probably_wrong 12y ago
It is definitely emotional for me: I remember reading yet another of these "java is not pass by reference" posts, and the title stuck for some reason. So next time I wrote a Java function (long afterwards), I modified a list received as an argument inside a function, and could not understand why my original list was modified.
I honestly feel that these posts titles are just trying to pull my leg. "Java passes everything by value!" "Really? And which value is being passed?" "The reference, of course!".
- lucio 12y agoI'm on the same page as you, that's why I'm getting the downvotes.
- jjnoakes 12y agoSo instead of programming based on vague recollections of blog titles, you should strive to understand the language you are writing in, so that you don't make those mistakes. Reading the content of the articles, doing some research, and actually understanding what is happening in the language are all good steps to consider taking.