If Radio button is checked method android

681 views Asked by At

Hey i have this code in java:

If (Yes.isChecked()){
                FreeEvent = "True";
            } else{
                FreeEvent = "False"; }

Yes is a radio button and FreeEvent is a string and both are setup fine. I want to execute Line2 if the radio button Yes is checked, any ideas why this method isn't working? Error is "Cannot resolve method 'If(boolean)'

1

There are 1 answers

0
MByD On
if (Yes.isChecked()){

not

If (Yes.isChecked()){

(lower case i )