字体:
Two things you can trust me. First, I'm not homosexual, lol. Second, you are confused with C++ reference and Java reference [#2876387@0 -ROLIA.NET 相约加拿大网上社区 之 枫下论坛 & 枫下部落, 枫下论坛主坛 ]

Two things you can trust me. First, I'm not homosexual, lol. Second, you are confused with C++ reference and Java reference

by super_unknown (mailman) at 2006.3.31 13:56 (#2876387@0)
What you described is C++ reference, which is basically a pointer whose value can't be modified once initialized, regardless the syntax

Java reference is not the same, try compile & run this code

import java.util.Vector;

class test {
static void main(String[] args) {
Vector a = new Vector();
Vector b = new Vector();
Vector temp = a;
a = b;
b = temp;
}
};

该话题已在历史区内,不能被修改或回复。       收藏    投诉
关闭窗口