lect 2
lect 2
Computer programming is
the design and the
implementation of
computer programs
Rm 3553, [email protected] COMP1022P (Spring 2020) 8 / 29
Computer Programming
Learning computer programming is just like learning a natural
language such as English, Japanese, Korean, etc.
Although they are similar, it doesn’t mean that they are exactly the
same
Briefing on Java
Java
I It is a name of an island of Indonesia
I It is also an informal name of a type
of brewed coffee :P
I Of course, it is also the name of a
programming language :D
History of Java programming language:
I It is invented by a group people
working in Sun Microsystems in 1991
I One of the major contributor is James
Gosling
I Initially the language is named Oak.
Then it is changed to Java after
visiting a local coffee shop
I Now, it is one of the most important
general purpose OOP language
Two components
https://www.oracle.com/
technetwork/java/javase/
downloads/
jdk13-downloads-5672538.
html
https:
//www.jetbrains.com/idea/
I Eclipse
I BlueJ
I jGRASP
I NetBeans
I JBuilder
Please refer to the download section of our course website for JDK and
IntelliJ IDEA.
Then type:
javac WelcomeStudents.java
in the command prompt (where javac is
JDK Java compiler)
Java compiler (javac) translates the Java source file ”WelcomeStudents.java”
into bytecode and saves it to the file ”WelcomeStudents.class”
Rm 3553, [email protected] COMP1022P (Spring 2020) 22 / 29
My First Java Program (Cont’d)
Step 3: To run the byte code with the Java interpreter
Type:
java WelcomeStudents
where java is JDK Java interpreter
The cursor is moved to the beginning of the next line, since println is used.
It will be explained more in the next lecture!
Rm 3553, [email protected] COMP1022P (Spring 2020) 23 / 29
Question
Algorithms Object-Oriented
Pseudo Code Programming
Computer Programs J2SE (Java 2 Standard
Edition)
Computer Programming
Bytecode
High Level Language
JI (Java Interpreter)
Assembly Language
JVM (Java Virtual Machine)
Machine Language
JIDE (Java Integrated
Compiler
Development Environment)
Interpreter
Case-Sensitive Language
Assembler
Procedural / Structured
Programming
Read the guide about how to download and install J2SE Development
Kit (JDK):
https://course.cse.ust.hk/comp1022p/jdk/
Read the guide about how to download and install IntelliJ IDEA:
https://course.cse.ust.hk/comp1022p/intellij-idea/