publi class MyEXception extends Exception{
}
public class Student{
public void Speak(int m) throws MyExcetion(){
if(m>1000){
throw new MyEXception ();
}
}
}
public class Test{
public static void main(String args[]){
new Student().Speak(123);
}
}