Berikut ini adalah hasil compilenya:
Berikut adalah source codenya:
/**
* Tugas 1
*
* @author (Christine Amelia)
* @version (2-09/03/2018)
*/
public class Tugas1
{
// instance variables - replace the example below with your own
private int x;
/**
* Constructor for objects of class Tugas1
*/
public Tugas1()
{
// initialise instance variables
x = 0;
System.out.println("Tugas 1 PBO B");
System.out.println("BIODATA");
System.out.println("Nama : Christine Amelia");
System.out.println("Kelas : PBO B");
System.out.println("Alamat : Jl. Keputih Tegal Timur II No. 19a");
System.out.println("Email : christineamel03@gmail.com");
System.out.println("No. HP/WA : 082172874560");
System.out.println("Twitter : @tineamels");
}
/**
* 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;
}
}
Tidak ada komentar:
Posting Komentar