Files
openide/java/java-tests/testData/refactoring/inlineMethod/NoAutomaticGetterUseGetterDoesDifferentThing.java.after

21 lines
327 B
Plaintext

class Complex {
private final double x, y;
Complex(double x, double y) {
this.x = x;
this.y = y;
}
double getX() {
return x+1;
}
double getY() {
return y;
}
}
class Use {
void test(Complex c) {
System.out.println(Math.hypot(c.x, c.getY()));
}
}