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 - Order By Newest

   next 30
 Q101. What could be the driving force to have dependencies injected through class than through config file while using IOC or Dependency Injection ? Design
Ans. Unit Testing

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

   Like         Discuss         Correct / Improve     dependency injection  inversion of control


 Q102. Design a Database Schema to store Employee Information with each employee having multiple addresses. Database
Ans. We can have 2 entities i.e EMPLOYEE and ADDRESS and can have a relationship Table , EMPLOYEE_ADDRESS having one to may relationship between the two.

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

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


 Q103. What is monkey patching ?Design
Ans. The term monkey patch only refers to dynamic modifications of a class or module at runtime, motivated by the intent to patch existing third-party code as a workaround to a bug or feature which does not act as desired.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q104. Can you explain software design principles cohesion and coupling with an example?Design
 This question was recently asked at 'Fidelity Information Services (FIS)'.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     cohesion  coupling     Asked in 1 Companies        frequent


 Q105. In singleton Pattern framework, Web application deployed on multiple cluster server will have how many objects?Design
 This question was recently asked at 'Pandora'.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     singleton     Asked in 1 Companies


 Q106. In a file there are 1 million words . Find 10 most frequent words in that file.Design
 This question was recently asked at 'Amazon'.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     file handling     Asked in 1 Companies


 Q107. How one dao Implementation object (singleton) can handle multiple requests?Design Pattern
 This question was recently asked at 'Capgemini'.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     singleton     Asked in 1 Companies


 Q108. Explain Facade design patternDesign
Ans. Single gateway of the entire application is called Facade Design Pattern.

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

   Like         Discuss         Correct / Improve     design pattern  facade     Asked in 1 Companies


 Q109. Write code for serialization.Core Java
Ans. // Java code for serialization and deserialization
// of a Java object
import java.io.*;

class Demo implements java.io.Serializable
{
   public int a;
   public String b;

   // Default constructor
   public Demo(int a, String b)
   {
      this.a = a;
      this.b = b;
   }

}

class Test
{
   public static void main(String[] args)
   {
      Demo object = new Demo(1, "geeksforgeeks");
      String filename = "file.ser";
      
      // Serialization
      try
      {
         //Saving of object in a file
         FileOutputStream file = new FileOutputStream(filename);
         ObjectOutputStream out = new ObjectOutputStream(file);
         
         // Method for serialization of object
         out.writeObject(object);
         
         out.close();
         file.close();
         
         System.out.println("Object has been serialized");

      }
      
      catch(IOException ex)
      {
         System.out.println("IOException is caught");
      }


      Demo object1 = null;

      // Deserialization
      try
      {
         // Reading the object from a file
         FileInputStream file = new FileInputStream(filename);
         ObjectInputStream in = new ObjectInputStream(file);
         
         // Method for deserialization of object
         object1 = (Demo)in.readObject();
         
         in.close();
         file.close();
         
         System.out.println("Object has been deserialized ");
         System.out.println("a = " object1.a);
         System.out.println("b = " object1.b);
      }
      
      catch(IOException ex)
      {
         System.out.println("IOException is caught");
      }
      
      catch(ClassNotFoundException ex)
      {
         System.out.println("ClassNotFoundException is caught");
      }

   }
}

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

   Like         Discuss         Correct / Improve     serialization     Asked in 1 Companies


 Q110. Explain flow of MVCDesign
Ans. It is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components are built to handle specific development aspects of an application

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q111. Design an inventory management system.Design
 This question was recently asked at 'verifone'.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


 Q112. What is micro-benchmarking in Java?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     


 Q113. Can you write critical section code for singleton design pattern ?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     singleton


 Q114. Design ATM machine application using oops.Design
 This question was recently asked at 'Atos'.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


 Q115. If you are given a choice to decide a Programming language for an application , what factors would you think of before deciding on the language to build it ?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     


 Q116. What is the programming advantage of Immutability ?Design
 This question was recently asked at 'Overstock.com'.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     mmutable  immutability  immutabilit     Asked in 1 Companies


 Q117. What are the disadvantages of immutability ?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     mmutable  immutability  immutabilit


 Q118. What are the ways to break singleton pattern ?Design
Ans. If we don't have double checked locking, it can be broken easily through multi threaded access.

Through Reflection.

If multiple class loaders are loading the class.

If the class is serializable or cloneable.


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

   Like         Discuss         Correct / Improve     singleton     Asked in 2 Companies      expert


 Q119. Why the singleton class should never implement Cloneable interface ?Design
Ans. Because Singleton implementation doesn't restrict it from cloning and hence we can have multiple objects when we actually don't intend it to have multiple objects.

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

   Like         Discuss         Correct / Improve     singleton  cloning


 Q120. How serialization breaks Singleton pattern ?Design
Ans. It's not serialization but de serialization that breaks purpose of singleton as new objects can be brought to life using the serialized object.

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

   Like         Discuss         Correct / Improve     singleton


 Q121. How Reflection can break any design pattern ?Design
Ans. Using java reflection api, we can tweak into a class and modify it's runtime behavior and hence modify the pattern it might be using.

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

   Like         Discuss         Correct / Improve     reflection


 Q122. Can we build an application that where few functions gets executed as a cron as well as services. How ? 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     


 Q123. How can we make sure that only one object of a class get's created ?Design
 This question was recently asked at 'Spillman 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


 Q124. Do you think we should have security Tokens in Url ?Design
 This question was recently asked at 'One click retail'.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


 Q125. What information should be sent in url vs sent within the body in case of Post request ?Design
 This question was recently asked at 'one click retail'.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


 Q126. Given the Phone keys mapping between numbers and characters as following

1 - a,b,c
2 - d,e,f

and so on, Write a Program that takes the integer as input and then print all possible combinations of characters matching those integers.

For example - 12 should return

ad,ae,af,bd,be,bf,cd,ce,cf
Design
 This question was recently asked at 'FlatIron Health'.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


 Q127. Given a comma separated string that signifies the current position in 4 * 4 tic tac toes game, write a program that gives the result of the game - If anyone win and if yes then who and if the game is still open.

For example - x,0,x,x,x,0,0,0,0,x,0,x means that 00 index has x, 01 has 0 and so on with x(3,3) has last element x
Design
 This question was recently asked at 'Spillman 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


 Q128. Does it make sense to send someone's social security number as path parm in a get request ?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     


 Q129. What is meant by Loosely coupled database design ?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     


 Q130. Write code to reverse a C-Style StringDesign
 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     


previous 30   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: