Added Java Code

Original java code for running experiment