Unclosed Character Literal error

In Java, single quotes can only take one character, with escape if necessary. You need to use full quotation marks as follows for strings:

You also used

which I assume should be

Note: When making char values (you’ll likely use them later) you need single quotes. For example:

Leave a Comment