Why does this throw NullPointerException?

Posted by Parhs on Stack Overflow See other posts from Stack Overflow or by Parhs
Published on 2010-05-04T13:21:14Z Indexed on 2010/05/04 13:28 UTC
Read the original article Hit count: 184

Filed under:
|
e.getCategory() != null ? e.getCategory().getName() : "";

This throws a NullPointerException and I do not understand why. Can anyone explain?

© Stack Overflow or respective owner

Related posts about java

Related posts about beginner