HI
What can go wrong if you replace && with & in the following code:
String a=null; if (a!=null && a.length()>10) {...}
&& and & operator in JAVA
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 8, 2011, 2:21 PM EST
VulpesRank #55 · 29.2K reputationPosted Nov 8, 2011, 11:23 PM EST
AartiRank #2,383 · 594 reputationPosted Nov 16, 2011, 10:56 PM EST