+ 4
How exactly does 'void' work?
5 Réponses
+ 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
+ 14
You may get idea from these threads :
https://www.sololearn.com/Discuss/271102/?ref=app
https://www.sololearn.com/discuss/342545/?ref=app
+ 8
-void : thoes not return a value
-return : return a value
https://www.thoughtco.com/void-2034326
+ 4
Thank you all for your answers.