Interview Questions and Answers for 'EPAM' | 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

   
Frequently asked in Genpact.
 Q31. What is object cloning ?Core Java
Ans. Its is the process of creating exact copy of an object being cloned. In Object class one native method called clone() is there which is meant for Shallow Cloning of Object. Shallow cloning means bitwise copy of an object.In case of primitive data type it will create an exact copy of primitive values as well as variables but if the object contains any reference of an object then it will not copy the referenced object rather it will create the copy of reference variable and assigned it to the old object.

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

   Like         Discuss         Correct / Improve     cloning     Asked in 3 Companies      basic        frequent


 Q32. Find Max from Stack in O(1) complexityAlgorithm
Ans. Create one extra field called MAX O(1)

when you an element to the stack check these two condition
1. Stack is empty, then MAX = element
2. Stack is not empty then check if the element is greater than MAX then MAX = element


when getMax fuction is called, then return MAX

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

   Like         Discuss         Correct / Improve     complexity  stack  data structure     Asked in 1 Companies


 Q33. In the Following code which foo will get called.

foo(Integer i){
}

foo(String s){
}

public static void main(){
passing foo(null);
}
Core Java
Ans. ambiguity error

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

   Like         Discuss         Correct / Improve     code  method  function  data types     Asked in 1 Companies


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


 Q35. What are the technologies you would like to work on ?General
Ans. Java 7 , SQL Server

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

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q36. Explain features of MongoDB.MongoDB
Ans. Document Oriented:
MongoDB stores the main subject in the minimal number of documents and not by breaking it up into multiple relational structures like RDBMS. For example, it stores all the information of a computer in a single document called Computer and not in distinct relational structures like CPU, RAM, Hard disk, etc.

Indexing: Without indexing, a database would have to scan every document of a collection to select those that match the query which would be inefficient. So, for efficient searching Indexing is a must and MongoDB uses it to process huge volumes of data in very less time.

Scalability: MongoDB scales horizontally using sharding (partitioning data across various servers). Data is partitioned into data chunks using the shard key, and these data chunks are evenly distributed across shards that resides across many physical servers. Also, new machines can be added to a running database.

Replication and High Availability: MongoDB increases the data availability with multiple copies of data on different servers. By providing redundancy, it protects the database from hardware failures. If one server goes down, the data can be retrieved easily from other active servers which also had the data stored on them.

Aggregation: Aggregation operations process data records and return the computed results. It is similar to the GROUPBY clause in SQL. A few aggregation expressions are sum, avg, min, max, etc

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q37. What is dynamic programming ?
Ans. Dynamic programming is as a problem solving approach in which problem is divided into simpler sub problems which are over lappping in nature and solved once. its results are stored into a suitable data structure and reused to solve bigger sub problems

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q38. How can we increase the speed of SQL queries ?Database
Ans. Using -
1. Prepared Statements
2. Using Indices
3. Using whereby clause only on indexed columns

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


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