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
Filed under: Agus Nizami, IT |
Tinggalkan Balasan