I am getting Syntax Error on the else statement in the following code :
switch(v.getId())
{
case R.id.b0 :
if(s.length()==1 && s.charAt(0)=='0');
{
et2.setText("0");
et1.setText("0");
}
else
{
s=s+"0";
call(s);
}
break;
//2nd case and body
}
The Error is : Syntax error on token "else", delete this token
Does java not permit this?
Will I have to use the nested switch?
Or is there something wrong with my code itself?
remove
;