Computer Science, asked by HridyaJagtap11, 5 months ago

int f = 97;

char ch2 = Character.toUpperCase((char)f);

System.out.println(ch2 +"Great Victory");​

Answers

Answered by Oreki
4

Output:

AGreat Victory

Explanation:

As, Unicode for 'a' is 97,

So, as ch2 is uppercase 'a' i.e., 'A' and is concatenated to "Great Victory",

Hence, "AGreat Victory".

Answered by anindyaadhikari13
2

Question:-

  • Write the output of the following code.

Steps:-

Given code,

int f=97;

char ch2=Character.toUpperCase((char)f);

System.out.println(ch2+"Great Victory");

ASCII value of a is 97.

Now, a is converted to uppercase

So,

result is AGreat Victory

Output:-

AGreat Victory

Similar questions