public class MyException {
	private String user="";
	private String password="";
	/**
	 * @param args
	 */
	public static void main(String args[]){
		MyException my=new MyException();
		try {
			my.validateUser("", "d");
		} catch (UserException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void validateUser(String user, String passwd)throws UserException{
		if(this.user==user && this.password==passwd){
			System.out.println("User Validated Successfully");
		}
		else
			throw new UserException("Invalid User Found");
	}
}
