So when writing my first "Hello World" app everything seemed to work just fine. I wrote the code, compiled it, and then ran the class file and it worked, I got the return Hello World! But when I tried to write another app which is basically the exact same thing just a different sentence, I keep getting a bunch of error codes saying illegal character. I did everything the exact same. I am using Text Edit on a Mac and using Terminal to execute the
Java code. Here is what I wrote....
public class MyFirstApp
{
public static void main(
String[] args )
{
System.out.println(“i rule the world!”);
}
}
When I type javac MyFirstApp.java in Terminal, I get this response....
Michaels-iMac:java michaelruebusch$ javac MyFirstApp.java
MyFirstApp.java:5: error: illegal character: '\u201c'
System.out.println(“i rule the world!”);
^
MyFirstApp.java:5: error: ';' expected
System.out.println(“i rule the world!”);
^
MyFirstApp.java:5: error: ';' expected
System.out.println(“i rule the world!”);
^
MyFirstApp.java:5: error: not a statement
System.out.println(“i rule the world!”);
^
MyFirstApp.java:5: error: ';' expected
System.out.println(“i rule the world!”);
^
MyFirstApp.java:5: error: illegal character: '\u201d'
System.out.println(“i rule the world!”);
^
6 errors
Anyone have any thoughts?