0

Does void necessary?

If I do not write use void for methods without return value, will it cause problems/errors?

23rd Nov 2016, 11:35 PM
balazsorban
balazsorban - avatar
2 Respostas
+ 42
Yes, it's necessary for define methods (functions that has not return) in Java.
24th Nov 2016, 12:06 AM
Jose
+ 1
The correct way is use void for methods, and data-type for functions.
24th Nov 2016, 1:49 AM
Passion