Interview Question for Software Engineer in Tests






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

Static class Vs Singleton Pattern ?
stackoverflow+difference-between-static-class-and-singleton-pattern

- BrainLess January 31, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A singleton pattern is implemented through a static object.

- star-star August 12, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Static is a class variable it is intialized only once...ordinary variables are object specific variables..each object will have its own copy of variables but it is not the case with Static variables..the same static variable is accessed by all the objects of the class(and so called class variable)...and the reason why we use static object variable in Singleton class so that whenever you try create object and since it is a static variable and holds the object reference we check it is NULL if not NULL we return the same reference by avoiding creation of multiple objects

- sastry.soft November 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Static is a class variable it is intialized only once...ordinary variables are object specific variables..each object will have its own copy of variables but it is not the case with Static variables..the same static variable is accessed by all the objects of the class(and so called class variable)...and the reason why we use static object variable in Singleton class so that whenever you try create object and since it is a static variable and holds the object reference we check it is NULL if not NULL we return the same reference by avoiding creation of multiple objects

- sastry.soft November 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Static is a class variable it is intialized only once...ordinary variables are object specific variables..each object will have its own copy of variables but it is not the case with Static variables..the same static variable is accessed by all the objects of the class(and so called class variable)...and the reason why we use static object variable in Singleton class so that whenever you try create object and since it is a static variable and holds the object reference we check it is NULL if not NULL we return the same reference by avoiding creation of multiple objects

- sastry.soft November 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

'Test code'

- Anonymous June 09, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Static is just a way to implement Singleton pattern. We need singleton pattern wherever we need just one instance of class. For example logger class.

- Praveen January 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

printf("Hello Wrong World");

- Anonymous January 07, 2012 | 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