+ 3
what does void mean??
8 Respostas
+ 6
It Has Many Meanings. Depending upon where u use it.
1) If used as Function Return Type, Then It Means It does Not returns Any Value To Calling Program. In "void main()" case it does not return any value to Operation System.
2) If Used for Declaring Data Type(E.G., in C Lang) Means It can Hold Any Type Of Value By Casting Machanism.
3) 2nd Specifies That it is used For Generic Types.
+ 3
it means that no value is expected to be returned
+ 3
Function Can Produce Output to Output Unit Such As Console but Does Not Returns Any Value... Hope U Got My Answer.
+ 2
The program having output to the console or what have you doesn't equate to the method returning a value.
+ 1
function has to define the return type
like string or int
if you don't want or your func doesn't return anything use void and then the func will not need to return nothing...
0
if it doesn't return anything so how come there will be output
0
@Ankit returning value and printing output to console are 2 different things. if you want to learn more about it please send your mail I'd. I will send you some sample code.
0
if we are not expecting any return value or object from a method then we write this void.