What is a JavaBean really? Simple explanation with examples
Hi everyone! I'm a beginner Java developer, studying for about six months. I'm reading a book and constantly come across the term "JavaBean". I kind of understand that it's some kind of class, but I get confused every time.
Different sources say:
- "JavaBean is a class that implements Serializable"
- "JavaBean must have a no-argument constructor"
- "All fields must be private, with access via getters and setters"
- "JavaBean is used for data encapsulation"
But when I look at real projects on GitHub, I see plenty of classes that are called "beans", but they don't implement Serializable. Or they use Lombok, which generates getters/setters. Is that still a JavaBean?
Here's an example of my class that I consider a JavaBean:
```java
public class User {
private String name;
private int