粗略谈写一个自定义类的一些注意要点
先定义一个简单的类:Employee
class Employee
{
// instance fields
private String name ;
private double salary;
private Local Date hireDay;
// constructor
public Employee(String n , double s, int year, int month , int day) {
name = n;
salary = s;
hireDay = Local Date.of(year, month, day);
// a method
public String getNa