Basic java code for all.