
define an exception called no match exception tat z thrown wen a string z not equal to india

class ExceptionExample
{
public static void main(String[] args) throws Exception
{
String z="Hello";
if(!z.equals("India")){
throw new Exception("No match exception");
}
}
}