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 Rating

   next 30
 Q61. Given a list of People, We need to distribute their gifts in such a way that

Any Person shouldn't get it's gift back
If A's gift goes to B, B's gift shouldn't go to A

Write a method that returns a Map where Key is the Person's name and value is the name of person whose gift was exchanged.
Design
 This question was recently asked at 'Canopy Tax'.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


 Q62. Write a method that takes a string as input and identifies if any permutation of the String is Palindrome ? For example - ttoobb has a permutation 'bottob' which is a palindrome. Design
 This question was recently asked at 'Canopy Tax'.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      expert


 Q63. 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     


 Q64. 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     


 Q65. 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     


 Q66. 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


 Q67. 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


 Q68. 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


 Q69. 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


 Q70. 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


 Q71. 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     


 Q72. 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


 Q73. 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


 Q74. 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


 Q75. 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


 Q76. 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


 Q77. 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


 Q78. 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     


 Q79. 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


 Q80. 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


 Q81. 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     


 Q82. 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


 Q83. 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


 Q84. 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


 Q85. 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


 Q86. 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


 Q87. What are different types of dependency injections ?Design
Ans. Setter injection
Constructor injection
Interface injection
Look-up method/method injection

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

   Like         Discuss         Correct / Improve     dependency injection   design patterns     Asked in 1 Companies


 Q88. 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


 Q89. 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


 Q90. What is abstraction ?Design
Ans. Abstraction is a process of hiding the implementation details and describing only the functionality to the user.

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

   Like         Discuss         Correct / Improve     bstraction  oops concepts  oops principle     Asked in 22 Companies


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: