• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

about serialization

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

in the above collar is not serilazed. but the program excutes fine .what is the use of "transient"


EDIT by mw: Added Code Tags -- please use these when posting code.
[ March 16, 2007: Message edited by: marc weber ]
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by karnatam narendraprasad:
...in the above collar is not serilazed. but the program excutes fine .what is the use of "transient"


JLS - 8.3.1.3 transient Fields: "Variables may be marked transient to indicate that they are not part of the persistent state of an object."

It might look like your program "executes fine," but it's not really doing what you think it's doing. It's a bad habit to catch an exception and do nothing with it -- for example...

If you add System.err.println(e); to your catch blocks, you should see what's really happening here.
[ March 16, 2007: Message edited by: marc weber ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic