Adding some java code