Skip to content Skip to sidebar Skip to footer

How Can I Pass A String Value, That Has Been Created In An If Statement, Through A Bundle Inside Another If Statement?

public class MainActivity extends Activity implements OnClickListener, AdapterView.OnItemSelectedListener, OnCheckedChangeListener{ @Override public void onCreate(Bundle icicle) {

Solution 1:

Just pull the definition of your variable outside of the if statement. eg:

final String charactername 
if() {
    charactername = ...
}
if() {
    bundle stuff with charactername 
}

Post a Comment for "How Can I Pass A String Value, That Has Been Created In An If Statement, Through A Bundle Inside Another If Statement?"