great reusable code of java