Interview Questions and Answers for 'Design' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Design' - 185 question(s) found - Order By Rating

next 30
 Q1. Could you walk me through and draw out a sketch of a recent architecture project you completed ?architecture
 This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     design     Asked in 1 Companies


 Q2. What are various design frameworks for Banking profile ?Design
 This question was recently asked at 'IBM India'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q3. Design Parking Lot.Design
 This question was recently asked at 'Visa'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q4. Design pattern used in struts.Struts
Ans. Struts controller uses the Command design pattern and the action classes use the Adapter design pattern. The process() method of the RequestProcessor uses the Template method design pattern.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Struts Design patterns     Asked in 1 Companies


 Q5. Write a Program to find out negative numbers in a list.Design
 This question was recently asked at 'nilla apps'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q6. How can we create an arraylist of unique values ?Core Java
Ans. We can put the value in a set to enforce uniqueness and then dum those value into an arraylist.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     arraylist  design  collections


 Q7. How would you design the database schema for an event?Database
Ans. Broad question, but if the company need velocity, think about use a NO SQL instead of regular SQL databases.

Also prefers materialized views instead of joins to fetch data quickly.

Regarding the database design, there are very good design tools for professional database (to develop proper indexes and good database design) one of the best is QuickDBD

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     database design  database schema     Asked in 1 Companies


 Q8. Design Texas Hold Em poker gameDesign
 This question was recently asked at 'Alcatel Lucent'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q9. What is the advantage of moving text messages to a separate properties file , like message.properties instead of hard defining it on the html ?Design
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q10. What are Hooks in programming and Design Patterns ?Design
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q11. If you are given choice to either load object eagerly or lazily , which one would you use in case of singleton pattern ?Design
Ans. I would choose Eager as the cost for 1 additional object is too minute for any such consideration.

Eager Loading results in Faster access ( Object available at load time) at the cost of additional space.

Lazy loading results in space saving ( Object available at first use ) at the cost of access speed.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     design Pattern  Singleton  Lazy vs Eager Loading


 Q12. What is your opinion about caching ?Design
Ans. Caching is a mechanism that provides faster access but at the cost of additional space. Caching is good if we need faster access and if it takes extensive processing to come to a value which doesn't gets changed frequently.

Caching could be an overhead if we don't need fast access or if the processed value changes too frequently.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q13. Explain SOLID principles.Design
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q14. Find the second largest array element without sorting?Design
Ans. We initialize two variables first and second to INT_MIN as,
first = second = INT_MIN
then Start traversing the array,
If the current element in array say arr[i] is greater
than first. Then update first and second as,
second = first
first = arr[i]
If the current element is in between first and second,
then update second to store the value of current variable as
second = arr[i]
then Return the value stored in second.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q15. What is runtime Polymorphism ?Design
 This question was recently asked at 'OFS Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q16. Can you tell us a use case of reflection in java that you have applied ?Design
 This question was recently asked at 'CenturyLink'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     reflection     Asked in 1 Companies


 Q17. Write program to control traffic in a parking lot.Design
 This question was recently asked at 'MathWorks'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q18. When singleton can break and how to resolve itDesign
Ans. Deserialization. In serialization, we can save the object of a byte stream into a file or send over a network. Suppose if you serialize the Singleton class, and then again de-serialize that object, it will create a new instance, hence deserialization will break the Singleton pattern.

To overcome this issue, we need to override readResolve() method in the Singleton class and return the same Singleton instance.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     singleton  design patterns     Asked in 1 Companies


 Q19. Create DB schema for Employee, Department.Database
 This question was recently asked at 'RiseSmart India,RiseSmart'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     db schema  database schema  database design     Asked in 2 Companies


 Q20. Design a appointment booking system for a chain of hospitals.Design
 This question was recently asked at 'ServiceNow'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q21. Can we keep application configuration at different places and what could be the consideration for choosing multiple places for doing so ?Design
Ans. Yes an application can have configuration stored at multiple places. Factors that could facilitate such a design could be

1. Type of config information - We may have a case to store confidential information differently than other regular config value

2. Environment - We may like to have a base config ( defined in application package ) and then a different override mechanism in different environments.

3. Centralization - Sometime some configs need to be shared across application and hence centralized.

4. Testing - Testing against config may not be possible in some enviornments in certain cases and hence additional config store might be kept for testing purpose only.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Design  Solution


 Q22. Write a calculator and find if a character appears more than n times ?Design
 This question was recently asked at 'Mercury Systems'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q23. Code an elevator simulator.Design
 This question was recently asked at 'TrustArc'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q24. Design an in memory object oriented system for a Car manufacturing Company ?Design
 This question was recently asked at 'Audacious Inquiry'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q25. If you are asked to develop a financial system, how would you make sure that there are proper checks , balances and audits ?Solution
 This question was recently asked at 'BzzAgent'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Design  Security     Asked in 1 Companies


 Q26. write a program for 4 digit otp generation?Design
Ans. import java.util.Random;

public class OTPGenerator {
public static void main(String[] args) {
int otpLength = 4;
String otp = generateOTP(otpLength);
System.out.println("Generated OTP: " otp);
}

private static String generateOTP(int length) {
StringBuilder otp = new StringBuilder();
Random random = new Random();

for (int i = 0; i < length; i ) {
int digit = random.nextInt(10);
otp.append(digit);
}

return otp.toString();
}
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q27. Design
 This question was recently asked at 'HeadStrong'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q28. If you have to pull a sub string out of a string, which method would you use - using String methods or Pattern / Matcher ?Design
Ans. It depends on how complex it is and if in future it would need any sort opf debugging. It's not easy to debug code if it's making heavy use of shortcuts like Lambda , Patterns etc.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     pattern matching  String  design


 Q29. How to avoid cloning, serialization in the singleton class ?Design
Ans. For Cloning-exception,For deserialization-read.resolve()

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     singleton  cloneable  serializable  serialization  cloning     Asked in 1 Companies


 Q30. How you can check Object is created or not in case of Singleton using Object class method ?Design
Ans. Reflections-- setAccesible--avoid using enumns

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: