added Java sample.

Hi,

I added some Java samples.
Please pull it :)