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 com.spec.model;
- public class Student {
- // имя
- private String name;
- // возраст
- private int age;
- // переменная с модификатором static
- private int instituteCode;
- // конструктор класса - без параметров
- // public Student() {
- //
- // }
- // конструктор класса
- public Student(String name, int age) {
- this.name = name;
- this.age = age;
- }
- // Alt+Insert
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public int getAge() {
- return age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- public int getInstituteCode() {
- return instituteCode;
- }
- public void setInstituteCode(int instituteCode) {
- this.instituteCode = instituteCode;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement