Some code to solve programming problems using Java language