Bean是一种满足以下特定规则的Java类:
1. There is a constructor that does not accept any parameters
2. Getters and Setters for all the properties used in jsp(variable FirstName, then getFirstName and setFirstName)
3. implement a Serializable or Externalizable interface
渣翻解释一下:
1. 提供默认构造方法(不传入任何参数)
2. 提供Getters和Setters
3. 实现Serializable或Externalization接口
写这些只是为了给小白建立起一个大致的印象,有兴趣可以自己查阅相关内容深入了解~