iZhirO

Class and object

Nov 14th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. class PondokIT{
  2.     private String message="Pondok Programmer";
  3.    
  4.     public void printMessage() {
  5.         System.out.println(message);
  6.     }
  7.     public String getMesaage() {
  8.         return message;
  9.     }
  10. }
  11. class clasandobject {
  12.     public static void main(String[] args) {
  13.         PondokIT pondokit = new PondokIT();
  14.         pondokit.printMessage();
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment