manusoftar

Untitled

Oct 7th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. package main;
  2.  
  3. public class MyObject {
  4.        private String name;
  5.        private int age;
  6.      
  7.        
  8.        public MyObject() {         
  9.        }
  10.        
  11.        public String getName() {
  12.             return name;
  13.        }
  14.        public void setName(String name) {
  15.             this.name = name;
  16.        }
  17.        public int getAge() {
  18.             return age;
  19.        }
  20.        public void setAge(int age) {
  21.             this.age = age;
  22.        }
  23.        
  24.        
  25. }
Advertisement
Add Comment
Please, Sign In to add comment