Work in HR or Recruiting?
Morgan Stanley
www.morganstanley.com New York, NY 5000+ Employees
Work in HR? Complete Your Profile

414 interview experiences Back to all Morgan Stanley Interview Questions & Reviews

Interview Question for Software Engineer at Morgan Stanley:
Jul 21, 2011

How do you implement a singleton in Java? Make it thread-safe.


Add Tags [?]

See more for this Morgan Stanley Software Engineer Interview

Helpful Question?  
Yes | No
Inappropriate?

Answers & Comments (2)

Jul 21, 2011

by ✳✳✳✳✳✳✳✳

This post has been removed. Please see our Community Guidelines or Terms of Service for more information.

1 of 1 people found this helpful

Sep 13, 2011

by ?:

public class Foo() {

    private static Foo instance;

    private Foo() {}

    public static syncrhonized Foo getInstance() {
        if (instance == null) {
            instance = new Foo();
        }

        return instance;
    }
}
Helpful Answer?  
Yes | No
Inappropriate?

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.