0

Do you know how to convert this void method to the return method in java?

https://code.sololearn.com/cGMsttKgyYVI/?ref=app

4th Apr 2023, 1:39 PM
Killiam Chances
Killiam Chances - avatar
1 Answer
+ 5
Normally, you delete the word void, put in the type of return you're expecting and then add return at the appropriate spot. You have a method there that returns a boolean and 2 methods that are void. So copy the idea from the first one into whichever one you need.
4th Apr 2023, 2:31 PM
Ausgrindtube
Ausgrindtube - avatar