Tuesday, March 9, 2010

Question asked in Cdac interview

1.

final int a = 1;
final int b;
b = 2;
int x = 0;
switch (x) {
case a:
System.out.println("Hello");
break;
case b:
System.out.println("World");
break;

}

what will be the output of this program.

No comments: