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 is a method in coding?
Why are data types important?
Describe what a thread-local variable is in java?
What is remote method invocation (rmi)?
What is the purpose of skeleton and stub?
What if I write static public void instead of public static void in java?
Define locale.
What is the different between get and post?
what is synchronization and why is it important? : Java thread
What is the difference between a choice and a list?
Does java return by reference?
What string is utf8?
Why put method is used?
What is the history of java?
What an i/o filter?