java code demo