What can go wrong if you replace &emp;&emp; with &emp; in the following code: String a=null; if (a!=null && a.length()>10) {

Q

What can go wrong if you replace &emp;&emp; with &emp; in the following code: String a=null; if (a!=null && a.length()>10) {...}

✍: Guest

A

A single ampersand here would lead to a NullPointerException.

2012-06-19, 2425👍, 0💬