Basically, i've imported this:

import java.security.*;

Then,
MessageDigest md = MessageDigest.getInstance("MD5");

creates the new instance of it. But im a bit unsure on the rest, i.e, the updating and digest etc? can someone show me how i can get a md5 encrypt of 'hello'

which would be

5d41402abc4b2a76b9719d911017c592