+ 2
what the example to use void
4 Respuestas
+ 3
Put void as the return type if your method doesn't return anything.
+ 3
every method except void returns value ,example
void showhello() {
System.out.println("hello world ");
//if it were int showhello() you must put sth
// like return 0 here
}
+ 1
if your method doesn't have any return type probably we use void
0
ok thnk guys