+ 4
what kind of method it is?
int breakPiggyBank() { System.out.println(” Gachan! “); return totalMoney; }
7 odpowiedzi
+ 4
It is a method with return type int that returns an value when gets called in main.
+ 4
Kind means what?
Mention some more details about your doubt pls..
+ 4
Jayakrishna🇮🇳
~ swim ~
Sorry.I thought method need to use void and above code didn't use void so it confuses me how to ask
+ 4
For sure not a method called within main without anything between those both parties...
+ 3
nknown no problem..
Return type tells what type of value that method will return...
If it is void, then it is returns nothing..
+ 2
But now I got it.