docted's recent timeline updates
docted

docted

V2EX member #218403, joined on 2017-03-02 13:31:19 +08:00
docted's recent replies
Mar 8, 2017
Replied to a topic by miaoxia 程序员 如何正确修改 Java 形参的引用?
changeReference(root);
其实这个方法里边传进去的是个引用,但是并不是 root 本身,其实就是 root 的一个副本。引用可以理解为一个指针, root 本身和副本指向同一个地址,但你在函数里 root = new TreeNode(3);其实是讲那个副本指向了一个新地址,再修改肯定对原来的没影响。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3814 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 05:04 · PVG 13:04 · LAX 22:04 · JFK 01:04
♥ Do have faith in what you're doing.