Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
c3r38r1701822190dMethod Overloading, Google that.
This is no place for this kind of questions tho'.
We're helpful, but we also have a bar. Asking for the answers to homework is below the bar. At best, answering questions like this* is enabling, at worst, it's contributing to the noted problems India has with academic plagiarism which is the result of a system which encourages this sort of proxy completionist approach to education**.
*They don't define what their confusion is, what effort they've already made in solving or understanding the problem themselves.
Ranchonyx8025190dWrong platform but...I'll be nice today.
There's two method signatures that have the same name.
One takes 1 param while the other takes 3.
Java infers which one to use by the number of arguments supplied.
It's called Method Overloading.
Furthermore, do not declare your main method as ...(String... args)
Standard is ...(String args)
String... is varargs.
akash25079940190dhello, guys, it was not my assignment or task, I just saw this image on the internet and after running the code I found a weird output, which I couldn't understand, so that's why I asked for help.