Kamis, 25 Desember 2014

Contoh program java class manusia

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package class_manusia;

/**
 *
 * @author User
 */
public class Main {
    static String nama ="Retno Anggrasari Purnomo";
    static String rambut ="Hitam";
    static String tinggi = "155";
    static String berat = "45";
    static String umur = "19";
    static String mata = "bulat,hitam";
    static String hidung = "mancung";
 

public static void biodata()
{
System.out.println("Nama Lengkap : ");
System.out.println("Warna Rambut : ");
System.out.println("Tinggi Badan : ");
System.out.println("Berat Badan :");
System.out.println("Umur : ");
System.out.println("mata : ");
System.out.println("hidung : ");

}

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("Nama Lengkap : "+nama);
System.out.println("Warna Rambut : "+rambut);
System.out.println("Tinggi Badan : "+tinggi);
System.out.println("Berat Badan : "+berat);
System.out.println("Umur : "+umur);
System.out.println("mata : "+mata);
System.out.println("hidung : "+hidung);

    }

}

Tidak ada komentar:

Posting Komentar