Check out example codes for "java bean". It will help you in understanding the concepts better.

Code Example 1

A JavaBean is just a standard

All properties private (use getters/setters)
A public no-argument constructor
Implements Serializable.

Learn ReactJs, React Native from akashmittal.com