<== Back
You need to know Java code instead of "programming" from the IDE. You need to be a "jedi" :p
Each time you use a fancy tool, you have to relearn the fancy tool. Just use notepad.
That way there is nothing fancy to learn. Nothing expensive to buy. It's free, it's easy.
Open Notepad to create program.
Do this by going to your directory (ie. "cd cmcculloh" to get to C:\cmcculloh\)
type "notepad Hello.java" (or notepad[space]whatever.java)
First we need to create our public class. Make sure the name of the class is the same
as the name of the file.
public class Hello {
}
Everything is going to go into the {} curly braces
then put this method in there:
public static void main(String[] args) {
}
When you start the program, whatever is in there will start running. THis is the entry point.
Then you put the message you want to print out:
System.out.println("Hello, world!");
Your final program should look like this:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
Now save it.
<== Back