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
What is the purpose of encapsulation?
What are scalar data types?
Can inner class extend any class?
What does next mean in java?
Is 0 true or false in java?
What is a byte string?
What is static variable with example?
What is bufferedwriter?
What do you know about the garbate collector?
Explain the overview of UDP messaging.
What is the do while loop syntax?
What is the purpose of stub and skeleton?
What is the use of arraylist class in java?
Can we assign null to double in java?
Can variables be used in java without initialization?