![]() |
|
| Java Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too. |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Jul 2006
Posts: 1,391
Thanks: 1
Thanked 28 Times in 25 Posts
Rep Power: 19 | J2EE - Is the ternary operator written x : y ? z or x ? y : z ? Is the ternary operator written x : y ? z or x ? y : z ? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> |
| | |
| | #2 (permalink) |
| Moderator Join Date: Apr 2006 Location: India
Posts: 637
Thanks: 57
Thanked 85 Times in 68 Posts
Rep Power: 19 | Re: J2EE - Is the ternary operator written x : y ? z or x ? y : z ? Both the statements are wrong, it should be written like this i < j ? i:j Condition followed by ? and then the : operator Let me know your questions Thank You |
| | |
| | #3 (permalink) |
| Junior Member Join Date: May 2007
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 3 | Re: J2EE - Is the ternary operator written x : y ? z or x ? y : z ? x?y:z |
| | |
| | #4 (permalink) |
| Junior Member Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 1 | Re: J2EE - Is the ternary operator written x : y ? z or x ? y : z ? well the actual syntax of ternary operator is <condition>?<true answer>:<false answer> for eg: (x>y)?x:y the above statement means if(x>y) then print x else print y |
| | |
| The Following User Says Thank You to arionweb For This Useful Post: | muskaan4u (09-04-09)
|
![]() |
| Tags |
| j2ee , operator , ternary , written |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| j2ee interview Q & A | jasmine84 | JAVA Technologies | 4 | 23-01-07 02:09 AM |
| Hiring Sr. J2EE Specialist | santhu | Experienced Jobs | 0 | 03-01-07 01:35 PM |
| Java Contest-13 with answers | keerthi | JAVA Technologies | 8 | 31-12-06 09:44 AM |
| Java J2ee Developer For CMMI level 4 company in Bangalore | sridhar | Experienced Jobs | 0 | 04-11-06 02:38 PM |
| Miracle Software Systems, Inc. Hiring Java J2EE Trainer | sridhar | Experienced Jobs | 0 | 12-10-06 12:44 AM |
| More Interview Questions Here... |