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

What is polymorphism in java? What are the kinds of polymorphism?

1052


Explain different ways of creating a thread. Which one would you prefer and why?

1018


What is field name?

997


What are adapter classes?

1027


What is the difference between preemptive scheduling and time slicing in java programming?

999


Do I need to import java.lang package any time? Why?

1358


What is skeleton and stub? What is the purpose of those?

1093


How does singleton class work?

970


What are the different conditional statements?

969


How can you set an applet’s height and width as a percentage?

917


List some important characteristics on jre

1056


How does predicate work in java?

964


How do you compare two strings lexicographically?

915


How to check if linked list contains loop in java?

880


What is the SimpleTimeZone class?

2250