Apisero interview question

why do we use volatile and transient keywords in java?