Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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 oopexercises.exer1;
- /**
- *
- * @author Sarl James D. Sebios
- */
- public class Person {
- String firstname = null;
- String middlename = null;
- String surname = null;
- public Person(String firstname, String middlename, String surname) {
- this.firstname = firstname;
- this.middlename = middlename;
- this.surname = surname;
- }
- public String getName() {
- return surname + ", " + firstname + " " + middlename;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement