Hi All,
Happy to find a newbe friendly forum!
I've got my code to be real simple but it still is giving me problems.
I'm trying to create and use a class outside of my main class.
Main Class: GreetingsUniverse
package com.scjaexam.tutorial;
//import com.scjaexam.tutorial.planets.*;
public class GreetingsUniverse {
public static void main(
String[] args) {
System.out.println("Greetings, Universe!");
Earth e = new Earth();
Mars e = new Mars();
Veuns e = new Venus();
}
}
Other Class: Earth
package com.sjcaexam.tutorial;
public class Earth {
public Earth {
System.out.println("Hello from Earth");
}
}
javac GreetingsUniverse.java
results in:
.\com\scjaexam\tutorial\Earth.java:4: <identifier> expected
public Earth {
^
Any help would be greatly appreciated.
Thanks
Rob