Java program for managing contacts