Added main method in example class and created Field class for future validation.