KnowledgeBoat Logo
LoginJOIN NOW

Computer Science

Differentiate between Character and String constant

Values & Data Types Java

120 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

46 Likes


Related Questions