try to serialize an object of a class which implements Serializable, but the object includes a reference to an non- Serializable class then a ‘NotSerializableException’ will be thrown at runtime..how can we avoid this through prefixing transient ..!!
Saral Saxena wrote:try to serialize an object of a class which implements Serializable, but the object includes a reference to an non- Serializable class then a ‘NotSerializableException’ will be thrown at runtime..how can we avoid this through prefixing transient ..!!
Just look for how to use Transient key word.
Or the classes of those objects should also implement Serializable.
I would suggest you to start with a tutorial on Serialisation, it will help you a lot in clearing all these queries.
Saral Saxena wrote:try to serialize an object of a class which implements Serializable, but the object includes a reference to an non- Serializable class then a ‘NotSerializableException’ will be thrown at runtime..how can we avoid this through prefixing transient ..!!
Please stop posting questions without doing any research first.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.