javaclass added

I added a sample code for java class