SyntaxFix
Write A Post
Hire A Developer
Questions
This will return the string only if the condition is true.
public String myMethod() { if(condition) { return x; } else return ""; }