失效链接处理 |
Foundations of Java Programming - OOP Option PDF 下载
本站整理下载:
相关截图:
![]()
主要内容:
1. Three options for running the HelloWorld Java program
There are three possible ways to type, compile, and execute a Java program.
You may use an online Java compiler. This is the best option for very short programs. Be aware that,
because of security concerns, Java programs executed by an online compiler will not be able to read
from and write into text files on your computer's hard drive.
You may use an Integrated Development Environment (IDE). Two very popular options are the
NetBeans IDE and the Eclipse IDE. Your Java programming will not come to a halt whenever the
Internet connection is down. The IDE option is preferred for longer Java programs, which are written as
stand-alone applications. Remember that you will have to write such a long and complex Java program
for your IB CS Internal Assessment component.
You may also use a Command Line Interface (CLI) programming environment. This option avoids
the Graphical User Interface (GUI) of the friendlier IDE, and is very seldom used. The javac.exe
compiler and the java.exe interpreter are needed for Java programs that use command line parameters.
1.1. The online Java compiler option
Step 1. Launch your trusted Internet browser and then go to:
https://www.onlinegdb.com/
Back-up plan: If the above web site is not working then to go to:
https://www.jdoodle.com/online-java-compiler/
Step 2. From the drop-down Language menu, in the upper right corner of the web page, select Java .
The HelloWorld Java program will automatically shows up.
The online compiler at www.onlinegdb.com does not use a package name, all the Java source files are
automatically made part of the same package. The name of the first Java source file is Main.java , and
the name of the public class in this file is Main . These two names cannot be changed to something else.
Step 3. Delete all the comments that were automatically included in the Java program, and align the
curly braces on the left side. The HelloWorld Java program should look like this:
|