Hello IOTA Forum

Exception propagation in Java

https://forum.helloiota.com/Topic19677.aspx

By ankitdixit - 6 Apr 2020

Hello Everyone, I want to know the most important java interview questions. My interview has been scheduled for next week and I am preparing for it, I just want to know more questions about exception propagation in Java. In my last interview, the recruiter asks me the syntax code of them and I have no answer at that time. Now I have found one reference for this java programming interview questions but I am confused is it correct coding syntax? Can anyone know to suggest me? I have mentioned that code below.
public class Sum()
{
public static void main(String args[])
{
addition()
}
public void addition()
{
add();
}
}

The stack of the above code is:
add()
addition()
main()

If an exception occurred in the add() method is not caught, then it moves to the method addition(). It is then moved to the main() method, where the flow of execution stops. It is called Exception Propagation.