Created
August 21, 2015 09:57
-
-
Save bangiqi/eb0c354594bbc320d430 to your computer and use it in GitHub Desktop.
file latihan aturan dasar PBO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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