Professional Documents
Culture Documents
Preparation
1.
Java Development Kit (JDK) versi 1.6 keatas. Java Development Kit merupakan perangkat lunak yang digunakan untuk melakukan proses kompilasi dari kode java menjadi bytecode yang dapat dimengerti dan dapat dijalankan oleh java runtime environtment. Java Runtime Environtment (JRE) Java Runtime Environtment merupakan perangkat lunak yang digunakan untuk menjalankan aplikasi yang dibangun menggunakan java. Versi JRE harus sama atau lebih tinggi dari JDK yang digunakan untuk membangun aplikasi agar aplikasi dapat berjalan sesuai dengan yang diharapkan. eClipse (juno) merupakan Java (Integrated Development Environment) IDE yang dikembangkan oleh IBM dan pada 2001 menjadi nonprofit Eclipse Foundation (www.eclipse.org) untuk mengelola sebagai suatu open-source platform.
2.
3.
20/03/2013
Run eclipse
Click Icon eClipse
20/03/2013
20/03/2013
20/03/2013
Algo
20/03/2013
20/03/2013
20/03/2013
and name space management. Note that types refers to classes, interfaces, enumerations, and annotation types. Enumerations and annotation types are special kinds of classes and interfaces, respectively, so types are often referred to in this lesson simply as classes and interfaces. A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar to different folders on your computer. You might keep HTML pages in one folder, images in another, and scripts or applications in yet another. Because software written in the Java programming language can be composed of hundreds or thousands of individual classes, it makes sense to keep things organized by placing related classes and interfaces into packages.
20/03/2013
10
20/03/2013
package01
11
20/03/2013
12
20/03/2013
13
20/03/2013
14
20/03/2013
15
20/03/2013
package Package01; public class Hello { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } }
16 Leon Andretti Abdillah, Data Structures, Review A&P 20/03/2013
package Package01;
17
20/03/2013
Click the green arrow at the top of the window to run the
program.
18
20/03/2013
19
20/03/2013
20
20/03/2013
package Package01;
21
20/03/2013
22
20/03/2013
Notes
Nama file harus sama dengan nama kelas program. Misal pada
kode diatas nama kelasnya adalah Hello, maka nama file harus Hello.java Hanya boleh terdapat satu kelas public pada sebuah file Kelas yang menjadi program harus memiliki metode public
static void main(String[] args)
23
20/03/2013
Escape Sequences
Escape Sequence \a \b \t \n \v \f \r \" \' \? Name Bell (alert) Backspace Horizontal Tab New line Vertical Tab Form feed Carriage return Double Quote Apostrophe Question mark Causes a carriage return Displays a quotation mark (") Displays an apostrophe (') Displays a question mark Description Makes a sound from the computer Takes the cursor back Takes the cursor to the next tab stop Takes the cursor to the beginning of the next line Performs a vertical tab
\\
\0 24
Backslash
Null
25
20/03/2013
Home work
Please read
If then else
Switch For While Do while
Prepare a group consist of 6-8 students Each student should have at least one blog (blogger/blogspot
or wordpress); note: the blog name must beyour real name combine with nim
26 Leon Andretti Abdillah, Data Structures, Review A&P 20/03/2013