what kind of method it is? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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
6 Respostas
+ 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