✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Результат компіляції програми
public class One {
double arithmetic (double a, double b) {
return a + b;
}
int arithmetic(int a) {
return a*a;
}
}
public class Two {
double arithmetic (double a, double b) {
return a - b;
}
int arithmetic(int a) {
return a / a;
}
}
public class Main {
public static void main(String[] args) {
One one = new One();
Two two = new Two();
System.out.println(one.arithmetic(5));
System.out.println(two.arithmetic(15, 5));
}
}