+ 4

what kind of method it is?

int breakPiggyBank() { System.out.println(” Gachan! “); return totalMoney; }

1st Aug 2020, 2:52 PM
Zwe Thu
Zwe Thu - avatar
7 Réponses
+ 4
It is a method with return type int that returns an value when gets called in main.
1st Aug 2020, 3:04 PM
Akash
Akash - avatar
+ 4
Kind means what? Mention some more details about your doubt pls..
1st Aug 2020, 2:56 PM
Jayakrishna 🇮🇳
+ 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
1st Aug 2020, 3:14 PM
Zwe Thu
Zwe Thu - avatar
+ 4
For sure not a method called within main without anything between those both parties...
1st Aug 2020, 3:15 PM
Sandra Meyer
Sandra Meyer - avatar
+ 3
nknown no problem.. Return type tells what type of value that method will return... If it is void, then it is returns nothing..
1st Aug 2020, 3:22 PM
Jayakrishna 🇮🇳
+ 2
But now I got it.
1st Aug 2020, 3:15 PM
Zwe Thu
Zwe Thu - avatar