Advertisement
sergAccount

Untitled

Apr 11th, 2021
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.mavenproject3;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Person {
  13.    
  14.     private String firstName;
  15.     private String lastName;
  16.  
  17.     public Person(String firstName, String lastName) {
  18.         this.firstName = firstName;
  19.         this.lastName = lastName;
  20.     }
  21.  
  22.     public String getFirstName() {
  23.         return firstName;
  24.     }
  25.  
  26.     public void setFirstName(String firstName) {
  27.         this.firstName = firstName;
  28.     }
  29.  
  30.     public String getLastName() {
  31.         return lastName;
  32.     }
  33.  
  34.     public void setLastName(String lastName) {
  35.         this.lastName = lastName;
  36.     }
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement