问答详情
源自:2-2 Data Binding基础用法

Employee 的代码是什么???

Employee 的代码是什么???

提问者:慕粉3607109 2017-05-19 17:30

个回答

  • JjayG
    2018-09-17 14:52:59

    Employee是个实体类代码
    Employee.java
    public class Employee{
    
        private String firstName;
        private String lastName;
    
        public Employee(String firstName, String lastName) {
            this.firstName = firstName;
            this.lastName = lastName;
        }
    
        public String getFirstName() {
            return firstName;
        }
    
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        }
    
        public String getLastName() {
            return lastName;
        }
    
        public void setLastName(String lastName) {
            this.lastName = lastName;
        }
    }


  • Captain2021
    2017-05-29 08:10:01

    employee property instance box