KnowledgeBoat Logo

Computer Applications

Distinguish between Character and String Constant.

Values & Data Types Java

ICSE

124 Likes

Answer

Character ConstantString Constant
Character Constants are written by enclosing a character within a pair of single quotes.String Constants are written by enclosing a set of characters within a pair of double quotes.
Character Constants are assigned to variables of type char.String Constants are assigned to variables of type String.

Answered By

82 Likes


Related Questions