Iklan

Learning Java Online


I am learning Java using Eclipse online from this youtube:

You have to download Eclipse and JDK first.

The tutorial is simple, step by step, and quite clear.

You will learn how to make project, class, method, etc.

Ini contoh programnya:


package tes;
import java.util.Scanner;

public class tes {
static Scanner input = new Scanner(System.in);

public static void main(String[] args) {
int height = 4;
int base = 95;
String message = "hii";

System.out.println("Height is " + height);

System.out.println("base is " + base);
int area = base * height / 2 ;

System.out.println("Area is " + area);

if(area<20) {
System.out.println("Kecil");
}
else {
System.out.println("Besar");
}

int i = 0;
while(i<=100) {
//System.out.println(i);
i++;
}
if (!message.equals("hi")) {
System.out.println("Baik");
}
else {
System.out.println("Wah anut anut");
}
}
}

Itulah programnya

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: