+ 4

How exactly does 'void' work?

27th Jan 2018, 7:29 AM
Torshie Torto
Torshie Torto - avatar
5 Respostas
+ 20
when method doesn't return a value ... for example a method prints "hello world" on the screen & nothing else ... so its void type as it doesn't return any value
27th Jan 2018, 7:54 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
27th Jan 2018, 7:35 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 8
-void : thoes not return a value -return : return a value https://www.thoughtco.com/void-2034326
27th Jan 2018, 7:39 AM
Youssef Ouamou
Youssef Ouamou - avatar
+ 4
Thank you all for your answers.
27th Jan 2018, 8:42 AM
Torshie Torto
Torshie Torto - avatar