Multiple choice

What is the meaning of the return data type void?

  1. An empty memory space is returned so that the developers can utilize it.

  2. void returns no data type.

  3. void is not supported in Java

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The void keyword in Java (and C/C++) indicates that a method returns no value. It specifies the absence of a return type, meaning the method performs its action but doesn't produce any result that can be assigned to a variable.