Skip to content

Instantly share code, notes, and snippets.

@bangiqi
Created August 21, 2015 09:57
Show Gist options
  • Save bangiqi/eb0c354594bbc320d430 to your computer and use it in GitHub Desktop.
Save bangiqi/eb0c354594bbc320d430 to your computer and use it in GitHub Desktop.
file latihan aturan dasar PBO
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.belajar.sebelasrpl;
/**
*
* @author ramdani
*/
public class SebelasRpl1 {
String namaSiswa = null;
String namaBenda = null;
String kondisi = null;
public static void main(String[] args)
{
SebelasRpl1 kelasSaya = new SebelasRpl1();
// ini untuk nama siswa
kelasSaya.namaSiswa = "Rizki Ramdani";
System.out.println("nama siswa : "+kelasSaya.namaSiswa);
//ini untuk nama benda
kelasSaya.namaBenda = "Kursi";
System.out.println("nama benda : "+kelasSaya.namaBenda);
System.out.println("kondisi : "+kelasSaya.kondisi());
}
public String kondisi()
{
this.kondisi = "baik";
return kondisi;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment