Highbridge Capital Interview Question for Java Developers

Team: Risk Metrics
Country: United States
Interview Type: Phone Interview

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

I wouldn't do either. I would create an immutable wrapper for my list by calling Collections.unmodifiableList (List<T> ls). But that is internally implemented as implementing the List interface and does not extend ArrayList. This only makes sense, since not every list wrapped in this wrapper is necessarily an ArrayList. It could be a LinkedList, etc.

- eugene.yarovoi July 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
of 1 vote

Making object mutable/nonmutable should not depend on what interface you implement or what class you extend.
There are basic differences on ArrayList and Vector or some other collections in java in regard to sycronization, allowing null values, keeping their order and the like - not with modifiebility as far as I know.
For immutability, you can consider using final keyword not change its values

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

Sure there are differences between classes based on mutability. Also, final doesn't make something immutable. This isn't const.

- eugene.yarovoi July 27, 2012 | Flag

Add a Comment

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


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


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