Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Java Programming/Keywords/transient

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

is a Java keyword which marks a member variable not to be serialized when it is persisted to streams of bytes. When an object is transferred through the network, the object needs to be 'serialized'. Serialization converts the object state to serial bytes. Those bytes are sent over the network and the object is recreated from those bytes. Member variables marked by the java keyword are not transferred; they are lost intentionally. Syntax: <member-variable>; or <member-variable>; For example: public class Foo implements Serializable { private String saveMe; private transient String dontSaveMe; private transient String password; //... } See also: Java language specification reference: jls Serializable Interface. Serializable deep