0

How Void as Return ?

Fill in the blanks to create a class with a method called "myFunc" that takes no parameters, returns void, and prints "Hi" to the screen. Why void as return we use void when we do not have to return anything.

26th Jun 2018, 5:05 AM
Shivanshu Gupta
Shivanshu Gupta - avatar
2 Respostas
+ 9
Returns void is just a different way of saying return nothing.
26th Jun 2018, 5:05 AM
Hatsy Rei
Hatsy Rei - avatar
0
okay thanks
26th Jun 2018, 5:06 AM
Shivanshu Gupta
Shivanshu Gupta - avatar