Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is int a class in java?

989


What kind of variables can a class consist?

1060


Which class should you use to obtain design information about an object in java programming?

1084


Explain what are final variable in java?

1087


What is lambda programming?

1021


What is the purpose of the main method?

994


What is an object’s lock and which object’s have locks?

967


How to access arraylist elements in java?

1002


What is difference between float and double?

968


Can you call a method on a null object?

1014


What happens when a thrown exception is not handled?

1117


What is break and continue statement?

1101


What are singleton services?

920


What is the difference between a choice and a list?

1081


What are static blocks in java ?

1115