Answer Posted / vishwanath
because it is called implicitly when object is created... so it doesn't have any target to return values....
for ex..
int v=Integer.parseInt(X.readLine());
int n=fact(v);
int fact(int)
{
.....return ans
}
so it return ans to the variable n which is assigned to calling statement..... when compared the constructor don't have any target to return
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Mention some interfaces implemented by linked list in java.
What does null mean in java?
Can we create object of static class?
How garbage collection is done in java?
How to reverse a string in java?
What is method in research paper?
Differentiate between static and non-static methods in java.
what is aggregation in java?
Is class is a data type?
How many types of methods are there?
What is the Concept of Encapsulation in OOPS
What is the difference between a loader and a compiler?
Is boolean a wrapper class in java?
What is the difference between the final method and abstract method?
Why lambda expression is used in java?