File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about transient modifier

 
Milind Mahajan
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic