0
About methods
guys. in which cases do we put void and data types in methods
3 Answers
0
Put void if you don't want the method to return a value. This is equivalent to a procedure.
Put a data type if you want to return a value. This is equivalent to a function.
0
If your method does not must return anything, you put void types in method, but if your method must return some value - you put data types(int, String...)
0
@JesusRaychuk your answer was helpful .. I'm thankful