Does constructor return any value in Java?
Answers
Answered by
0
So when you call the constructor using a new keyword you get an object. Though it doesnt explicitly return something but instead it creates or constructs something which you can use as an instance of a class. yes, it is the current class instance. (We cannot use return type yet it returns a value).
Answered by
1
Answer:
A return statement ends the execution of a function, and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can return a value to the calling function. For more information, see Return type.
Explanation:
Similar questions