• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

about serialization

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!