TUGAS PBO - B (PERKENALAN)


/**
 * Write a description of class pertama here.
 * Tugas PBO membuat class java
 * @author faizal mabrury
 * @version 3/9/2018
 */
public class pertama
{
    // instance variables - replace the example below with your own
    private int x;

    /**
     * Constructor for objects of class pertama
     */
    public pertama()
    {
        // initialise instance variables
        x = 0;
        System.out.print("Tugas 1 PBO B\n");
        System.out.print("---------------------------------------------------------\n");
        System.out.print("Nama          :Faizal Mabrury\n");
        System.out.print("Kelas         :PBO B\n");
        System.out.print("Alamat Rumah  :Rt 03/Rw 03, Malebo, Kandangan, Temanggung\n");
        System.out.print("Email         :icangmabrury@gmail.com\n");
        System.out.print("Blog          :insyaallahbermutu.blogspot.com\n");
        System.out.print("No HP         :085729791897\n");
        System.out.print("Twitter       :icang1948\n");
    }

    /**
     * An example of a method - replace this comment with your own
     *
     * @param  y  a sample parameter for a method
     * @return    the sum of x and y
     */
    public int sampleMethod(int y)
    {
        // put your code here
        return x + y;
    }
}

hasilnya:

Komentar