Advertisement
sergAccount

Untitled

Aug 16th, 2020
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 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.spec.model;
  7.  
  8. public class Student {
  9.     // имя и возраст
  10.     private String name;
  11.     private int age;
  12.     //
  13.     public Student(String name, int age) {
  14.         this.name = name;
  15.         this.age = age;
  16.     }
  17.     //
  18.  
  19.     public String getName() {
  20.         return name;
  21.     }
  22.  
  23.     public void setName(String name) {
  24.         this.name = name;
  25.     }
  26.  
  27.     public int getAge() {
  28.         return age;
  29.     }
  30.  
  31.     public void setAge(int age) {
  32.         this.age = age;
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement