25. Given the variables defined below:
int one = 1;
int two = 2;
char initial = '2';
boolean flag = true;
Which of the following are valid?
a) if( one ){}
b) if( one = two ){}
c) if( one == two ){}
d) if( flag ){}
e) switch( one ){}
f) switch( flag ){}
g) switch( initial ){}
my ans to this question is:c,d,e,f,g
the clearly ans is not given it just dudge my ans :wrong.
I know the parameter apply the switch is
string,boolean,char,int.
Do you think my ans is right?if not ,where is wrong?and what is the right answer?