KnowledgeBoat Logo
|

Computer Science

Differentiate between Character and String constant

Values & Data Types Java

123 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

48 Likes


Related Questions