由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: Is java using call by reference?
相关主题
Java 问题[转载] Re: 拜托大家,帮我看看是怎么回事
清教关于编译原理please help: pass values to jsp from js
annotation questionhow to return multiple values of basic data type?
invoke a function dynamically in Java?is there anyway that i can return...
Re: java enclosure是什么-今天被hm问倒了请教高手一个JDBC的问题!
another aspectJ question[转载] Java 1.5 Generic 问题
关于得到generic type的问题求助!使用object tag如何让IE和firefox兼容applet?
为什么结果是3?default value in hibernate?
相关话题的讨论汇总
话题: call话题: value话题: reference话题: change话题: java
进入Java版参与讨论
1 (共1页)
a****o
发帖数: 37
1
generally, if a func is call by value, you have no way to
change the value.
if it's call by reference, you can change it if it give you
such method.
In java, every object is a reference, and func is call by
value. So if you call f(o), you can not make o refer to
other objects, which means it is call by value. But you can
use o.setXXX to change o's state.
Just like in C
f(A* p);
it is call by value (value of the pointer), but you can call
p->setXXX() to change the state.
1 (共1页)
进入Java版参与讨论
相关主题
default value in hibernate?Re: java enclosure是什么-今天被hm问倒了
网站国际化的问题another aspectJ question
大家帮忙看看这个语句关于得到generic type的问题求助!
Is there a way to pass by value in Java?为什么结果是3?
Java 问题[转载] Re: 拜托大家,帮我看看是怎么回事
清教关于编译原理please help: pass values to jsp from js
annotation questionhow to return multiple values of basic data type?
invoke a function dynamically in Java?is there anyway that i can return...
相关话题的讨论汇总
话题: call话题: value话题: reference话题: change话题: java