Redian新闻
>
Top Ten Errors Java Programmers Make(8)
avatar
Top Ten Errors Java Programmers Make(8)# Java - 爪哇娇娃
b*g
1
8. Comparison assignment ( = rather than == )
This is an easy error to make. If you're used other languages before,
such as Pascal, you'll realize just how poor a choice this was by the
language's designers. In Pascal, for example, we use the := operator for
assignment, and leave = for comparison. This looks like a throwback
to C/C++, from which Java draws its roots.
Fortunately, even if you don't spot this one by looking at code on the
screen, your compiler will. Most commonly, it will report
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。