Which of the following is a valid constant declaration in Java?
3 Likes
final int x = 10;
Reason — In Java, constants are declared using the final keyword. The correct way is:
final
x
Answered By
1 Like
int x = 98; char ch = (char)x; what is the value in ch?
Consider the array given below:
char ch[] = {'A','E','I','O', 'U'};
Write the output of the following statements:
System.out.println(ch[0]*2);:
There are 128 set of different characters used in a Java program.