Java code for personal use and study