package com.lovecoding.day10.cons01;

import java.util.Date;

public class Student {

    String name;
    int age;
    char gender;

    //代码块
    {
        //当前时间
        System.out.println(new Date(System.currentTimeMillis()));

        //初始化赋值
        this.name = " 李四 ";
        this.age = 24;
        this.gender = '女';
    }

    //创建对象 显示创建对象完成的时间
    public Student() {

    }

    public Student(String name) {

        this.name = name;
    }

    public Student(String name, int age) {

        this.name = name;
        this.age = age;
    }

    public Student(String name, int age, char gender) {

        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
