45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




Java Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too.

J2EE - Is the ternary operator written x : y ? z or x ? y : z ?

        

Reply
 
LinkBack Thread Tools Display Modes
Old 23-01-07, 02:41 PM   #1 (permalink)
Junior Member
 
preethisingh's Avatar
 
Join Date: Jul 2006
Posts: 1,391
Thanks: 1
Thanked 28 Times in 25 Posts
Rep Power: 19 preethisingh is a jewel in the rough preethisingh is a jewel in the rough preethisingh is a jewel in the rough
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>

preethisingh is offline Offline   Reply With Quote
Old 07-03-07, 06:17 PM   #2 (permalink)
Moderator
 
t_mohan's Avatar
 
Join Date: Apr 2006
Location: India
Posts: 637
Thanks: 57
Thanked 85 Times in 68 Posts
Rep Power: 19 t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold
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


t_mohan is offline Offline   Reply With Quote
Old 18-05-07, 09:41 PM   #3 (permalink)
Junior Member
 
Join Date: May 2007
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 3 ambikamullasseri is on a distinguished road
Re: J2EE - Is the ternary operator written x : y ? z or x ? y : z ?

x?y:z
ambikamullasseri is offline Offline   Reply With Quote
Old 13-12-08, 04:48 PM   #4 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 1 arionweb is on a distinguished road
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
arionweb is offline Offline   Reply With Quote
The Following User Says Thank You to arionweb For This Useful Post:
muskaan4u (09-04-09)
Reply

Tags
j2ee , operator , ternary , written


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +6.5. The time now is 03:24 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0