f1 = new Fraction2(2, 3);
f2 = new Fraction2(1, 3);
f3 = new Fraction2(5, 6);
f1.square();
f3=f2.copy();
System.out.println(f3);
f2.square();
public Fraction2 copy() {
a = a/(gcd(a,b));
b = b/(gcd(b,a));
return Fraction2.this;
这个return 怎么改?
print result f3=1/3
Case 2: f1 = 4/9; f2 = 1/9; f3 = 1/9
想要的结果 1/3 ;