Identify the return type of a method that does not return any value.

Java MCQ: Identify the return type of a method that does not return any value.

a) void
b) int
c) double
d) null

Answer:

a) void

Explanation:

In Java, the void keyword is used as the return type of a method that does not return any value. This indicates that the method performs an action but does not send any data back to the caller.

Reference links:

https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top