Check out example codes for "1.13. programacion orientada a objetos en java". It will help you in understanding the concepts better.

Code Example 1

miFraccion = Fraccion(3,5)

Learn ReactJs, React Native from akashmittal.com