Program Code in Notepad
Ad
wxPython IDE www.wingware.com Edit, Test, and Debug Free 30-day Trial
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.
The first thing you need is a place to write your Java code. All Java programs are written using plain text files, therefore you can write them without any fancy software. For your first program, open up the simplest text editor you have on your computer. I’ll be using Notepad.
The program code looks like this:
// The classic Hello World program!
class HelloWorld {
public static void main(String[] args) {
//Write Hello World to the terminal window
System.out.println("Hello World!");
}
}
You could cut and paste the above code into your text editor, but it’s better to get into the habit of typing it in. It will help you learn Java quicker because you will get a feel for how programs are written, and you will make mistakes! It may sound odd, but any mistakes you make will help you become a better programmer in the long run. Just remember that your program code must match the example code, and you’ll be fine.
For this first program, I’m not going to explain how it works or what all the code means; that will come in later tutorials. At the moment, it’s more important for you to experience the steps you should follow to create and run a program.
Присоединяйтесь — мы покажем вам много интересного
Присоединяйтесь к ОК, чтобы подписаться на группу и комментировать публикации.
Нет комментариев