I'm starting to learn java, and of course HelloWorld is the first program. Below is what I have written:
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println(“Hello, world!”);
}
}
and the error always comes out as this when I use javac HelloWorld.java:
`HelloWorld.java:5: error: illegal character: \8220
System.out.println(“Hello, world!”);
^
HelloWorld.java:5: error: ';' expected
System.out.println(“Hello, world!”);
^
HelloWorld.java:5: error: illegal start of expression
System.out.println(“Hello, world!”);
^
HelloWorld.java:5: error: ';' expected
System.out.println(“Hello, world!”);
^
HelloWorld.java:5: error: illegal character: \8221
System.out.println(“Hello, world!”);
^
5 errors`
Using Terminal on a Mac, used cp introcs (where I placed the file).
"
not“
. – herry Mar 5 '14 at 7:39