Siemens Healthineers Interview Question

Using plain Java how to print number into words