Advertisements
Advertisements
Question
The variable must be declared ______ type, if a character is to be assigned to it.
Options
Char
Ch
Character
Alphanumeric
MCQ
Fill in the Blanks
Solution
The variable must be declared char type, if a character is to be assigned to it.
Explanation:
In Java, the char data type represents a single character. If you wish to assign a character to a variable, declare it char.
shaalaa.com
Is there an error in this question or solution?