+ 1
What is void?
9 Answers
+ 2
void is a return type, if we will declare a method as a void, then that method will not return anything.
+ 1
@JenqAU whenever a method is created the method definition must tell the Java program what data the method will send back when it executes successfully (a number, a string, a character, etc).
The keyword void is used when a method is designed to not send back any data. It let's the Java program know, "this method does not return any data".
The keyword void is not a return type, just information that nothing will be returned.
Hope this helps.
0
it means that the method returns nothing
0
it means the method main does not return anything...if you have knowledge of C or C++ then you should know that any method in programming languages have return types which is mentioned before writing the method name...in this case it is void...there are other return types as int , String , char , byte etc
0
when ever you call a method it goes to that method and executes the code written in it and the executed answer will be returned to method held by the method.
So if you declare any methods as VOID then it is not going held the value.Because nothing returns to it.
0
Every method should return something either as integer value or string value or anything else.
If we don't want the method to return anything then declare it as 'void'.
0
void is a return type which tells that the method returns no value
0
void is a return type which tells that the method returns no value
0
void is a keyword in Java which is used to indicate the compiler that the function or method will not be returning any value