Have you got a chance to read some beginner Java books?
https://wiki.openmrs.org/display/docs/Programming+Learning+Resources