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 / amit singh
answer is that compile time error
because what you did i don't know what i saw i know
else if(7=x+3)
it not a condition you are using the assignment operator
in place of (7==x+3)
amitsing2008@gmail.com
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is the difference between iterator and enumeration ?
Which collection is thread safe in java?
Can a constructor be made final?
How many threads can I run java?
What is the dot operator?
What will be the default values of all the elements of an array defined as an instance variable?
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.
What is the difference between static binding and dynamic binding?
What methods are used to get and set the text label displayed by a button object?
In java, how we can disallow serialization of variables?
Does printwriter create a file?
Can we declare an array without size in java?
What is a void method?
What is the purpose of lambda expressions?
How many bits is a double?