IntelliJ Java IDE
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes question  about transient modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "question  about transient modifier" Watch "question  about transient modifier" New topic
Author

question about transient modifier

Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
Hi,
I read in RHE that transient variables may not be static or final. But why does the following line compile ?
final static transient int i = 10;
Thanks
Milind
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Milind,
Though there is no current implementation of this specification, static transient are allowed and compile just fine.
Regards,
Beno�t
Jonathan Jeban
Ranch Hand

Joined: Oct 08, 2000
Posts: 52
Hi,
Transient variables can be both final and static.
RHE have corrected this in their errata.(They have asked to
ignore that statement)

Hope this helps..
Jeban
 
 
subject: question about transient modifier
 
Threads others viewed
transient variables
transient variable with static,final modifiers
is trasient + static valid ??
tarnsient variables
final transient and static transient
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture