guys. in which cases do we put void and data types in methods
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.
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...)
@JesusRaychuk your answer was helpful .. I'm thankful