Unclosed Character Literal error
Java uses double quotes for "String"
and single quotes for 'C'
haracters.
In Java, single quotes can only take one character, with escape if necessary. You need to use full quotation marks as follows for strings:
y = "hello";
You also used
System.out.println(g);
which I assume should be
System.out.println(y);
Note: When making char
values (you'll likely use them later) you need single quotes. For example:
char foo='m';