mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
GitOrigin-RevId: 287af8db31ae356162add06e3564c4052025a026
21 lines
330 B
Plaintext
21 lines
330 B
Plaintext
class Complex {
|
|
private final double x, y;
|
|
|
|
Complex(double x, double y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
double getX() {
|
|
return x;
|
|
}
|
|
|
|
double getY() {
|
|
return y;
|
|
}
|
|
}
|
|
class Use {
|
|
void test(Complex c) {
|
|
System.out.println(Math.hypot(c.getX(), c.getY()));
|
|
}
|
|
} |