Która z następujących metod nie jest przeciążeniem metody: int test(int s)
int test(String s)
int test(int s, int t)
test(String s, int t)
Dla mnie to wszystkie te metody są przeciążone, dlaczego?
int test(String s) - ta sama nazwa, różny typ argumentów
int test(int s, int t) - ta sama nazwa, różna liczba argumentów
test(String s, int t) - ta sama nazwa, różna liczba argumentów, nie ma podanego typu metody, ale wyczytałem, że typ zwracanej wartości przez metode nie jest istotny w przeciążaniu metod
Także, gdzie robie błąd?