Fair Issac Interview Question for Financial Software Developers






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

1. If the class can be serialized then we need to have the readResolve method for our help.

2. If the same class is loaded by two different class loaders then we just cant stop this.

- helper May 09, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

You can create as many instances of a singleton class if Reflection is used.

- shunya May 12, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hey Shunya,

Can you explain a bit more on how you go about having many instances of Singleton using Reflection? and How exactly you can achieve the fail condition?

However, i totally agree that Singleton won't actually behave the way it is intended, in a clustered environment...

- Harsh May 13, 2008 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Even if you use Reflection you can actually control the no of instances created. Think about this. Hint: Count

- helper May 22, 2008 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yes, I tried.
Singleton instance = Singleton.getInstance(100);
Singleton another = (Singleton) methods[i].invoke(null, parameters);

These two got two different instances.

- july6th February 25, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

No "serialyzed". No "clonable"?

- job-searcher May 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) Reflection
2) If Singleton class implements either Serialization or Cloneable interface and provide the support to both.
3) In multi-threaded environment if synchronization of createInstance() is not taken care.
4) If Singleton class is loaded in Multiple JVM. In case of distributed env.
5) Multiple java class loaders loads the class.
6) Multiple factory taking care of creating the instance is not implemented properly.
7) Subclassing the singleton class.
8) Double checked locking.
9) If class Garbage collected and it again reloaded.
10) Programmatic reloading the class mainly in case of Servlet engine.

- master January 03, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@master: Can you plz tell how to avoid failing of singleton pattern ? will be of great help ..

- KT July 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) DCL failure prior to JDK5
2) Diff class loaders.
3) Serialization

- Anonymous May 22, 2011 | 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