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
Is binary a low level language?
What are the advantages of exception handling?
How does multithreading take place on a computer with a single cpu?
Can you write a java class that could be used both as an applet as well as an application?
What is lambda in java?
When should the method invokelater() be used?
Is object a data type in java?
Which one will take more memory: an int or integer?
Can I import same package/class twice?
Can list be final in java?
what state does a thread enter when it terminates its processing? : Java thread
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
What things should be kept in mind while creating your own exceptions in java?
What is the program development process?
Why is multithreading important?