Advertisement
sergAccount

Untitled

Mar 28th, 2021
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 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.app21;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Person {
  13.    
  14.     private String name;
  15.     private int age;
  16.  
  17.     public Person(String name, int age) {
  18.         this.name = name;
  19.         this.age = age;
  20.     }
  21.  
  22.     public String getName() {
  23.         return name;
  24.     }
  25.  
  26.     public void setName(String name) {
  27.         this.name = name;
  28.     }
  29.  
  30.     public int getAge() {
  31.         return age;
  32.     }
  33.  
  34.     public void setAge(int age) {
  35.         this.age = age;
  36.     }
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement