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;
}
}

Answers were Sorted based on User's Feedback



what is the output??????? public class multireturn { public(int assign x ( int x) { if..

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

what is the output??????? public class multireturn { public(int assign x ( int x) { if..

Answer / 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

what is the output??????? public class multireturn { public(int assign x ( int x) { if..

Answer / guest

7 or 5 depending on value of x but never 6

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the 6 mandatory procedures for iso 9001?

0 Answers  


What is AppletStub?

1 Answers  


What is the meaning of flag day?

0 Answers  


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

0 Answers  


What are Advatages of Overloading and Overridding.

8 Answers   TCS, Wipro,


What is the difference between overriding & overloading?

0 Answers  


What is difference between an object and a class?

0 Answers   Amdocs,


why interaction with server using javascript is difficult

1 Answers  


What is core java called?

0 Answers  


What is the difference in between cpp and java? Can u explain in detail?

0 Answers  


What is a treemap in java?

0 Answers  


Java support what type of parameter passing ?

7 Answers   Wipro,


Categories