Dokumentasi Pertemuan Pertama PBO Kelas B
Latihan pertama membuat program dalam Bahasa Java menggunakan aplikasi BlueJ
Hasil :
Sourcecode :
Hasil :
/**
* Hello World Test Sample
* by
* @author (Muhammad Husni Ridhart Azzikry)
* @date (3/9/2018)
*/
public class HelloWorld
{
// instance variables - replace the example below with your own
private int x;
/**
* Constructor for objects of class HelloWorld
*/
public HelloWorld(String messageToDisplay)
{
System.out.println(messageToDisplay);
}
public HelloWorld(String firstMessage, String secondMessage)
{
this(firstMessage);
System.out.println(secondMessage);
}
/**
* 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;
}
}
Komentar
Posting Komentar