Advertisement
sergAccount

Untitled

Dec 13th, 2020
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 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.ja9;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Person {
  13.    
  14.     private String name;    
  15.     // нет конструктора без параметров
  16.     //public Person(){}
  17.     // конструктор с параметром
  18.     public Person(String name) {
  19.         this.name = name;
  20.     }        
  21.     public String getName() {
  22.         return name;
  23.     }
  24.  
  25.     public void setName(String name) {
  26.         this.name = name;
  27.     }        
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement