+ 2

what the example to use void

15th Sep 2016, 12:34 PM
reynaldo
4 ответов
+ 3
Put void as the return type if your method doesn't return anything.
15th Sep 2016, 12:45 PM
Zen
Zen - avatar
+ 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 }
15th Sep 2016, 3:48 PM
Henok
Henok  - avatar
+ 1
if your method doesn't have any return type probably we use void
15th Sep 2016, 12:40 PM
Teja Naraharisetti
Teja Naraharisetti - avatar
0
ok thnk guys
15th Sep 2016, 1:06 PM
reynaldo