Kayıtlar

Ocak, 2017 tarihine ait yayınlar gösteriliyor

Transient

In the context of Java, 
the transient keyword is used as field modifier.
If we declare a field as transient; that field would not be serialized even if the class implements Serializable.
private transient int count;
In Java, transient is used only for fields, so methods, classes and interfaces can not be declared as transient.

Checked & Unchecked Exceptions

Checked Exceptions
are subclasses of java.lang.Exceptionneed to be declared in a method or constructor's throws clause
Unchecked Exceptions
are subclasses of java.lang.RuntimeExceptiondo not need to be declared in a method or constructor's throws clause
In the context of common transaction APIs, such as JTA or Spring transaction APIs;
anyRuntimeException triggers rollback, and any checked Exception does not rollback the transaction.


Runtime Rollback Unchecked