Why is Java pass by value only? -


so here worthy downvote question.

i understand java pass value , means , how works. not can explain pass value is. more curious why java not include pass reference? imagine useful? helpful know cement reasoning in head....

i hate 'it because is' scenarios surely equivalent of 'because said so'. have answer why java includes pass value?

o'reilly's java in nutshell david flanagan puts best: "java manipulates objects 'by reference,' passes object references methods 'by value.'" design decision java. when pass objects around, still manipulating same underlying object reference same memory location. i'm not sure specific scenario thinking can't existing java mechanisms.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -