Highbridge Capital Interview Question for Java Developers


Country: United States
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
0
of 0 vote

after serialization if u have altered the class like making non-transient instance variable to transient/alter the class hierachy etc then while deserialization InvalidClassException will come as system will compare deserialized class version with serialized one.So to avoid this we give our own versionId instead of default one,so that it wont change n u can still play around your class.

- sarthakiter July 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The Serial Version ID is used when serializing and deserializing an object. Java recognizes if the bytes you want to deserialize match the local class version. If not it will throw an exception.

- Geet August 18, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The Serial Version ID is used when serializing and deserializing an object. Java recognizes if the bytes you want to deserialize match the local class version. If not it will throw an exception.

- Geet August 18, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

serial version UID
All the persistance capable classes are given a additional field called the serial version UID by the compiler
At the time of serializtion of an object to a Hard or a file this field will also be part of the serialized object
This field is used at the time we deserialize object

there is serial version problem gernerally occured
if we serialize an object it stores in the file system with that serial version UID.
in the mean time if we make any changes to the class and compile then the serial version UID changes
then a error will gernerate saying that invalid class exception as the serial version UID of the class and the object does not match

- Balu September 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nice reply!

- Sankar April 13, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Refer to following link

javapapers.com/core-java/serialversionuid-in-java-serialization/

- Manisha February 11, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More