I am new and just trying to do the most basic of all, simple 'Hello World'
Here is the code, The same you find anywhere:
class HelloWorld {
public static void main (String args[]) {
System.out.println(“Hello World!”);
}
}
When I run in the terminal (I use a Mac) I am posed with the following errors:
HelloWorld.java:3: error: illegal character: '\u201c'
System.out.println(“Hello World!”);
^
HelloWorld.java:3: error: ';' expected
System.out.println(“Hello World!”);
^
HelloWorld.java:3: error: not a statement
System.out.println(“Hello World!”);
^
HelloWorld.java:3: error: ';' expected
System.out.println(“Hello World!”);
^
HelloWorld.java:3: error: illegal character: '\u201d'
System.out.println(“Hello World!”);
^
5 errors
What is going on here? All the errors are the string!
“ is the wrong character to use to denote a string - you should use ".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With