import java.util.Scanner;
class InvalidNameException extends Exception
{
InvalidNameException(String msg)
{
super(msg);
}
}
class EmployeeName
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
try
{
System.out.print("Enter Employee Name: ");
String name = sc.nextLine();
if(name.trim().isEmpty())
throw new InvalidNameException("Name is Invalid");
System.out.println("Employee Name: " + name);
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
sc.close();
}
}




