These are sample JAVA code to post of Stackoverflow and other places.