这段代码的目的是什么?
public Fraction(Fraction other) {
num = other.num;
denom = other.denom;
}如果你有这样的构造函数:
public Fraction(int n, int d) {
num = n;
denom = d;
}为什么必须初始化other.numtonum和other.denomto denom. 复制构造函数的语法是什么?什么目的?
梵蒂冈之花
呼唤远方
慕田峪7331174
肥皂起泡泡
相关分类