What will be the result of compiling and running the following program?.
public class Main { public static void main(String[] args) { for (Character c = 'A'; c < 'F'; c++) switch (c) { default: System.out.print((char) ('a' + c - 'A')); break; case 'B': System.out.print(c);/*from w ww .j av a 2s . co m*/ break; case 68: System.out.print(c); // 68 == 'D' } } }
Select the one correct answer.
aBcDe
(d)
There are no problems with automatic unboxing/boxing of the Character variable c in the various contexts where it is used in the program.