• 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:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

what is the diff?

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1)what is the difference between conversion and casting?

2)what is mean by object persistent state?
 
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
Casting is one type of conversion. A "conversion" changes the type of a reference or primitive value. Sometimes this is implicit -- for example, an upcasting assignment conversion, a widening method invocation conversion, or perhaps a String conversion. Other times, an explicit cast is used. (See JLS - 5 Conversions and Promotions.)

An object's "persistent state" is the information needed for it to "persist" outside the JVM so that it can be recreated later. For example, you might serialize an object to a file. Basically, the persistent state is the values of its instance variables.
reply
    Bookmark Topic Watch Topic
  • New Topic