Scala Tutorial - Scala Char Type








Char literals are written with single-quotes, distinguishing them from String literals, which are written with double quotes.

Example

The following example illustrates the Char type:

val x = 'X'