generally example, how to use java