Java Classes Question:
Download Questions PDF

If the method does not return a value, its return type must be void
A) True
B) False

Answer:

It's true. If a method is not returning any value then we must have to specify it's return type as void.void indicates that method is not returning any value.

Download Java Classes Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between instantiation & initialization?In this example class-var = new classname( ); The class name followed by parentheses specifies the _________ for the class

A) Variables
B) Constructor
C) Objects
D) Memory