SyntaxFix
Write A Post
Hire A Developer
Questions
You have a risk of NullPointerException if your calculateStr() method returns null and then you try to call a method on str.
NullPointerException
calculateStr()
More generally, avoid having variables with a null value. It stronger for class attributes, by the way.