Objectives
We would like to :
Understand what a text editor is.
Understand the edit -> compile -> execute cycle
Enter a first Java Program
Notes
To write programs we need one more tool, a
text editor
.
A text editor is a program that allows us to put text into a file.
The
Edit - Compile - Execute
cycle
We will use the text editor to put Java code in a .java file.
We will then use the Java compiler to produce java byte-code
We will thin use the JRE to try to run or execute that code.
For this I will use a simple program.
Hello World!
is a very simple, program people often use to demonstrate the programming process.
In Java hello world is:
class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }
We will create this program in a number of environments.
One side note, when we save the program, it must be called
HelloWorld.java
.
We will work on understanding this program in the next video.
In jGRASP
jGRASP is a
development environment
This is is what Dr. Kovalchick uses.
I will use it in the beginning.
It is fairly easy to use.
Do a demo.
You don't need the fancy environment if you want to be more simple:
Notepad comes on most windows box.
Notepad++
is aimed at programming.
Do a demo.
I use a program called VIM
Dr. Menon uses
the eclipse IDE
.
Visual Studio Code
is very popular.
You need to work out an environment in which you will work.
Any of the above will do.
I think jGRASP is probably the easiest for beginners.