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;
}
}
Answers were Sorted based on User's Feedback
Answer / 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 |
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 |
What is merge sort in java?
what is encapsulation in java? Explain
What is the purpose of format function?
Is java programming easy?
What are strings in physics?
Explain about complier design(phases)
0 Answers Aditi Placement Service,
What is a reflection package?
How can we pass argument to a function by reference instead of pass by value?
os is developed in c no java is more secured then c na why dont the os developed is developed using java
There are 100 keys and values in HashMap.how to get the keys and values?
Differentiate between stringbuffer and string?
Write a factorial program using recursion in java?