Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? [Re:臧圩人]
JiafanZhou



版主


发贴: 736
积分: 61
于 2008-09-29 16:39 user profilesend a private message to usersend email to JiafanZhousearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
IMHO, using "?:" properly can greatly simplify the code. And it is really a matter of taste of each individual Java programmer. Once you get used to "?:", you will find the code is more readable and easier to understand.

Actually, it is called shortcut version (or compact version) of if-else statement. In other words, they are the same from a compiler's perspective.

Regards,
Jiafan



When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.

话题树型展开
人气 标题 作者 字数 发贴时间
14805 JAVA面试题解惑系列(十一)——这些运算符你是否还记得? 臧圩人 6140 2008-08-25 09:08
12157 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? JiafanZhou 91 2008-08-27 19:45
11959 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? scottding 96 2008-09-10 17:23
12082 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? andy_wang_5 67 2008-09-11 10:01
12082 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? JiafanZhou 630 2008-09-11 22:17
11920 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? newfish 182 2008-09-24 00:23
11777 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? JiafanZhou 398 2008-09-25 16:15
12111 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? 690716494 44 2008-09-26 23:14
11768 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? andy_wang_5 86 2008-09-27 09:30
12442 Re:JAVA面试题解惑系列(十一)——这些运算符你是否还记得? JiafanZhou 391 2008-09-29 16:39

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923