O
olivier.melcher
Hi,
i'm started with Java Programming, i'm trying to run a very simple
sample code.
Can anyone tell me why it's not compiling right?
I'm running Netbeans IDE 6.1 with Java JDK 6 on Linux OS (Ubuntu).
I've got the Java API Documentation placed in my Java Home Directory (/
home/olivier/jdk1.6.0_06/docs)
Here is the code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myfirstproject;
/**
*
* @author olivier
*/
class MyFirstJavaClass {
/**
* Method main
*
*
* @param args
*
*/
public static void main(String[] args) {
System.out.println(“chocolate, royalties, sleep”);
}
}
Here is the error message i get when trying to compile the code:
init:
deps-jar:
Compiling 1 source file to /home/olivier/NetBeansProjects/
MyFirstProject/build/classes
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal character: \8220
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: ';' expected
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal start of expression
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal character: \8221
System.out.println(“chocolate, royalties, sleep”);
4 errors
BUILD FAILED (total time: 0 seconds)
Thanks for the help!
i'm started with Java Programming, i'm trying to run a very simple
sample code.
Can anyone tell me why it's not compiling right?
I'm running Netbeans IDE 6.1 with Java JDK 6 on Linux OS (Ubuntu).
I've got the Java API Documentation placed in my Java Home Directory (/
home/olivier/jdk1.6.0_06/docs)
Here is the code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myfirstproject;
/**
*
* @author olivier
*/
class MyFirstJavaClass {
/**
* Method main
*
*
* @param args
*
*/
public static void main(String[] args) {
System.out.println(“chocolate, royalties, sleep”);
}
}
Here is the error message i get when trying to compile the code:
init:
deps-jar:
Compiling 1 source file to /home/olivier/NetBeansProjects/
MyFirstProject/build/classes
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal character: \8220
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: ';' expected
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal start of expression
System.out.println(“chocolate, royalties, sleep”);
/home/olivier/NetBeansProjects/MyFirstProject/src/myfirstproject/
MyFirstJavaClass.java:21: illegal character: \8221
System.out.println(“chocolate, royalties, sleep”);
4 errors
BUILD FAILED (total time: 0 seconds)
Thanks for the help!