I have looked in the Javadoc but couldn\'t find information related to this.
I want the application to stop executing a method if code in that method tells it to do
Just do:
public void onClick() { if(condition == true) { return; } string.setText("This string should not change if condition = true"); }
It's redundant to write if(condition == true), just write if(condition) (This way, for example, you'll not write = by mistake).
if(condition == true)
if(condition)
=