|1||Find the value of b at the end of the program|
|2||Integer conversion output|
|3||Integer conversion output106|
|4||Floating point variables conversion|
|5||Print character variables after conversion|
|6||Integer Group Literals addition|
|8||Print character variables after conversion2587|
What will be the output of the following program?
Correct Answer : D
The above program raises an compilation error because the variable
s is already declared as a parameter for the
main method which is
String s. Again
s is used to declared a
short variable as
short s = 0313. So this raises a compilation error, since two variables with the same name can not in the same scope.
Hence, the answer is D.
Topic: Type Conversion In Java