source code

import java.util.Scanner;
public class laporangaji {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    // TODO code application logic here
    Scanner input=new Scanner(System.in);

    int i=0;
    String jabatan[] = new String [100];
    int transport[]= new int [100];
    int gaji[]= new int [100];
    int tunjangan;
    int gajikotor;
    int pph=0;
    int gajibersih;


    System.out.print("Kode Pegawai : ");
    int kode=input.nextInt();
    System.out.print("Nama Pegawai : ");
    String nama=input.next();
    System.out.print("Golongan : ");
    int gol=input.nextInt();



    switch (gol){
        case 1:
            jabatan[i]="Manajer";
            transport[i]=100000;
            gaji [i]=2000000;
            break;
        case 2:
            jabatan[i]="Supervisor";
            transport[i]=75000;
            gaji [i]=1500000;
            break;
        case 3:
            jabatan[i]="Staff";
            transport[i]=50000;
            gaji [i]=1000000;
            break;
        case 4:
            jabatan[i]="Ass. Staff";
            transport[i]=50000;
            gaji [i]=750000;
            break;
        case 5:
            default:
            System.out.println("Golongan yang ada pilih tidak ada, silahkan masukkan golongan 1, 2, 3, atau 4");
            break;
    }
    for (int j=gol;j25){
                System.out.println("Jumlah hari yang anda masukkan salah!");
                break;
            }

        System.out.println("Jabatan : "+jabatan[i]);
        System.out.println("Transport/Hr : "+transport[i]);
        System.out.println("---------------------------");
        System.out.println("Gaji Pokok : "+gaji[i]);

        tunjangan=absensi*transport[i];
        System.out.println("Tunj. Transport : "+tunjangan);
        System.out.println("---------------------------");

        gajikotor=gaji[i]+tunjangan;
        System.out.println("Gaji Kotor : "+gajikotor);

        if(gajikotor >=1500000){
            pph =(int) (gajikotor*0.02);

        }
        System.out.println("PPH : "+pph);

        gajibersih=gajikotor-pph;

        System.out.println("");
        System.out.println("Gaji Bersih : "+gajibersih);
        break;
    }
}

}