I have made a program in which i want to calculate the power set size.But i am unable to do it because the ouput of the statement 1 is 0?Why is this showing wrong?
public class PowerSetDemo
{
public static void main(String s[])
{
int q=0;
char a[]={'a','b'};
int p=a.length;
System.out.println(p);
q=2^p; //error here
System.out.println(q); Why 0?
}
}
OutputShown 2 0