1.

What is the return type of a method that does not return any value?(a) int(b) float(c) void(d) doubleThis question was addressed to me in an interview for job.I'd like to ask this question from Introduction To Methods in portion Classes and Methods of Java

Answer»

The correct option is (C) VOID

To elaborate: RETURN type of a method MUST be MADE void if it is not returning any value.



Discussion

No Comment Found

Related InterviewSolutions