Pl. suggest :
The problem is with terenaray operator.When I am putting
66 as value-1 & '65' as value-2 ,I am getting comp.'n error saying
invalid character constant, whereas if I am putting '6' as value-2,
it get compiled.
class Operator31
{
public static void main(
String[] args)
{
int x=1;
// Lna:System.out.println((x>3 )?66:'65');//compErr:Invalid
//character constant.-'65'
Lnb: System.out.println((x>3 )?66:'6');
//compiling (x>3?66:'6');o/p=6.
}
}// end of class Opeartor31
I am clueless. . .
Thanks,
Vikas