Apisero Interview Question

why do we use volatile and transient keywords in java?