回复 wo不帅
写得很清楚,你需要建立一个class,里面必须有个3个constructor,利用get set 来控制variab ...
shippo 发表于 2011-6-21 09:09 PM
还要 copy constructor.
class Car{
public Car(){
}
public Car(Car car){
this.properti = car.p ...
宅男-兜着走 发表于 2011-6-21 10:45 PM
a == b? false
a equals b? true
等以后你了解到 pass by value 和 pass by reference 的时候,你就会了解到 copy constructor 和 equals me ...
~Zero 发表于 2011-7-1 09:52 AM
欢迎光临 JBTALKS.CC (https://jbtalks.my/) | Powered by Discuz! X2.5 |