added initial java code