java - serialVersionUID naming convention -



java - serialVersionUID naming convention -

is there viable reason why serialversionuid field not named serial_version_uid?

according docs java.io.serializable:

a serializable class can declare own serialversionuid explicitly declaring field named "serialversionuid" must static, final, , of type long:

any-access-modifier static final long serialversionuid = 42l;

while referring java naming conventions static final (constants) fields should capitilized having fragments separated underscore.

probably because serialversionuid defined in java serialization api before such conventions existed.

i found document published sun in 1997 called java code conventions says in section 9 on page 16 "the names of variables declared class constants , of ansi constants should alluppercase words separated underscores (“”)."_

so guess sun didn't enforce own standards on own code.

java naming-conventions serializable

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -