Why use finally

They differ if the try-block completes by throwing a java.lang.Throwable that is not a java.lang.Exception, for instance because it is a java.lang.Error such as AssertionError or OutOfMemoryError. the try-block completes abruptly using a control flow statement such a continue, break or return the catch-block completes abruptly (by throwing any throwable, or using a control flow … Read more

Multiple return statements without compiler error

It does not give a compilation error because it is allowed by the Java Language Specification. However, it gives a warning message because including a return statement in the finally block is usually a bad idea. What happens in your example is the following. The return statement in the try block is executed. However, the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)