what is the output???????
public class multireturn
{
public(int assign x ( int x)
{
if(4==x)
{
return 7;
}
else if (7=x+3)
{
return 6;
}
return 5;
}
}
Answer Posted / pranali bhise
It will result in Compile time error due to 3 reasons
1) The parenthesis '(' after public is not allowed.
2) The space between "assign" and "x" is not allowed
3) 7 = x + 3 is not allowed as a variable is needed on the
left hand side of the assignment operator.
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
What does \ mean in regex?
What are byte codes?
What is difference between final and immutable?
What is structure of java heap? What is perm gen space in heap?
Do you know why doesn't the java library use a randomized version of quicksort?
Can a main method be overloaded?
Does java arraylist maintain insertion order?
What is the purpose of void class?
what is recursion in java
Why do I need to declare the type of a variable in java?
What is thread count in java?
Implement a stack with push (), pop() and min() in O(1) time.
What is the purpose of skeleton and stub?
Why heap memory is called heap?
Explain about main thread in java?