First, please UseCodeTags (⇐Click) when posting code samples. That makes them much easier to read.
You're seeing a weird artifact of autoboxing. Because Integer.parseInt() returns an int, Java decides the whole expression should have the type int, so it tries to unbox t.abc. Unboxing a null will give you an NPE every time. If you changed Integer.parseInt(strA) to Integer.valueOf(strA), which returns an Integer, then the whole expression would be of type Integer. In that case, Java would not try to unbox t.abc, and everything would work fine.
posted 4 years ago
Thanks a lot for explanation, my problem is resolved after I changed it to a Integer.valueOf()