English

The variable must be declared ______ type, if a character is to be assigned to it. - Computer Applications

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?
Chapter 2: Library Classes - EXERCISES [Page 177]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 2 Library Classes
EXERCISES | Q I. 8. | Page 177
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×