+ 1

A method declared with arguments..cannot be executed if it didn't take those arguments ?

6th Apr 2018, 9:20 PM
De Vinci
2 odpowiedzi
+ 3
Yes, but you can overload funcion: void println(String s) { System.out.println(s) } void println(int t) { System.out.println(t) } void println() { System.out.println("") } Now you can use the same function for String, int and without arguments.
6th Apr 2018, 9:23 PM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
thank you :)
6th Apr 2018, 9:29 PM
De Vinci