1. Add a Button to your xml file.
3. You can now add the setText line of code to any method. For example, in an onClickButton method.
public void onClickButton(View v) { //needs import android.view.View;
myButton.setText("This is the new text!");
}
4. Compile and run!