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. |
|
| ||||
Interview Questions and Answers for 'Epam' - 38 question(s) found - Order By Rating | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
Ans. A List is an child interface of collection interface in java where as Linked list is and implementation class of List interface which has doubly linked as a underlying data structure | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  linkedlist  list vs linkedlist Asked in 1 Companies | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
Ans. private void permutation(String prefix, String sufix) { int ln = sufix.length(); if(ln == 0) { System.out.println(prefix); } else { IntStream.range(0, ln).forEach(i->permutation(prefix sufix.charAt(i), sufix.substring(0,i) sufix.substring(i 1, ln))); } } call:permutation("", "abcdef"); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  String  code  coding Asked in 1 Companies | ||||
| ||||
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 | ||||
Frequently asked in Genpact. | ||||
| ||||
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 | ||||
| ||||
Ans. static keyword is used to specify that the respective programming construct ( method , variable ) belongs to the class and not to its instance and is supposed to be shared by all instances of the class. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  static keyword Asked in 1 Companies basic   frequent | ||||
| ||||
Ans. General contract of hashCode is: 1.Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, 2.If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. 3.It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hashcode Asked in 1 Companies expert | ||||
| ||||
Ans. Zero Degree. Because the hour and minute hands overlap once in an hour. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. Factory Design Patterns is the pattern that recommends creation of separate Factory Object for creation of other object. So its like saying - If you want to create an object of ClassA, Talk to FactoryObject ( which is an object of FactoryClass ). FactoryObject in itself encapsulates the inputs and logic required to make the decision regarding the creation and construction of object. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design pattern  factory design pattern Asked in 9 Companies | ||||
| ||||
Ans. [Open Ended Answer] | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. [Open Ended Answer] | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 2 Companies | ||||
| ||||
Ans. [Open Ended Answer] | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 2 Companies   frequent | ||||
Frequently asked in Cognizant ( Based on 2 feedback ) | ||||
| ||||
Ans. Inner join is the intersection of two tables on the condition defined by the where clause i.e will get records from both tables matched by a column. Outer join is the union of two tables i.e will get all records from both tables and will put null in the columns where related records are not present. Left Outer join is the left union of two tables i.e all records from the table on the left and values from the right table for related records else null for the columns from right table. Right Outer join is the right union of two tables i.e all records from the table on the right and values from the left table for related records else null for the columns from left table. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  sql  inner join  outer join  right join  left join Asked in 24 Companies basic   frequent | ||||
| ||||
Ans. An Exception in java is the occurrence during computation that is anomalous and is not expected. Exception handling is the mechanism which is used to handle such situations. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  exception handling Asked in 18 Companies basic   frequent | ||||
| ||||
Ans. If the process / app is abruptly killed or terminated. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  exception handling  finally Asked in 2 Companies intermediate | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. public class SingleTon { private SingleTon() { if (singleTon != null) { throw new RuntimeException("cant not create the object"); } } public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException("can not be create"); } static private volatile SingleTon singleTon; public static SingleTon getInstance() { SingleTon singleTon = this.sample; if (singleTon == null) { synchronized (this) { singleTon = this.singleTon; if (singleTon == null) { singleTon = this.singleton = new SingleTon(); } } } return singleTon; } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  singleton  design pattern Asked in 2 Companies | ||||
| ||||
Ans. 1. Static class is a class which cannot be instantiated and all its members are static whereas Singleton is the class that only permit creation of single object and then the object is reused. 2. As there is no object in Static class, it cannot participate in runtime Polymorphism. 3. As Static class doesnt allow creating objects and hence it cannot be serialized. 4. Static class body is initialized eagerly at application load time whereas Singleton object can be initiated eagerly using static blocks or lazily on first need. 5. Its not recommended to use pure static class as it fails to use many OOPs concepts. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Static Class  Singleton  Static Class vs Singleton Asked in 3 Companies Intermediate   frequent | ||||
| ||||
Ans. [Open Ended Answer] This is a very sensitive question and should be dealt with caution. Just simply saying that you never had any disagreement will present you as dumb team member. Showing your self as too aggressive in such decisions will present you as a trouble maker. You should present a situation where you had an argument / disagreement but eventually you and your team mates mutually found a way out of it. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 20 Companies basic | ||||
| ||||
Ans. Coupling is the degree of interdependence between software modules, a measure of how closely connected two modules are or the strength of the relationships between modules. Cohesion refers to the degree to which the elements of a module belong together. Cohesion measures the strength of relationship between pieces of functionality within a given module. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  coupling  cohesion Asked in 10 Companies   frequent | ||||
| ||||
Ans. Both are creational design patterns. Singleton is used when we would like to reuse an object if object is not supposed to hold request or thread specific information. Inversely Prototype is used in situations where we would like to reuse the object information but the request / thread may require it own data to be persisted. In short, Singleton is used in situations where we can live with single object being shared across multiple requests or threads whereas Prototype is used when we need duplicate copies of objects. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design pattern  singleton  prototype  creational design pattrn Asked in 7 Companies expert | ||||
Try 1 Question(s) Test | ||||
Very frequently asked. Among first few questions in almost all interviews. Among Top 5 frequently asked questions. Frequently asked in Indian service companies (HCL,TCS,Infosys,Capgemini etc based on multiple feedback ) and Epam Systems | ||||
| ||||
Ans. "equals" is the method of object class which is supposed to be overridden to check object equality, whereas "==" operator evaluate to see if the object handlers on the left and right are pointing to the same object in memory. x.equals(y) means the references x and y are holding objects that are equal. x==y means that the references x and y have same object. Sample code: String x = new String("str"); String y = new String("str"); System.out.println(x == y); // prints false System.out.println(x.equals(y)); // prints true | ||||
Sample Code for equals | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   string comparison   string   object class   ==   equals   object equality  operator   == vs equals   equals vs == Asked in 294 Companies basic   frequent | ||||
Try 6 Question(s) Test | ||||
Frequently asked. Favorite question in Walk in Drive of many Indian service companies. | ||||
| ||||
Ans. clone() - Creates and returns a copy of this object. equals() - Indicates whether some other object is "equal to" this one. finalize() - Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. getClass() - Returns the runtime class of an object. hashCode() - Returns a hash code value for the object. toString() - Returns a string representation of the object. notify(), notifyAll(), and wait() - Play a part in synchronizing the activities of independently running threads in a program. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   object class Asked in 16 Companies basic   frequent | ||||
Try 1 Question(s) Test | ||||
Very Frequently asked to fresh graduates and less experienced. Favorite question in Walk in drives. Frequently asked in Indian Services companies. | ||||
| ||||
Ans. Overloading - Similar Signature but different definition , like function overloading. Overriding - Overriding the Definition of base class in the derived class. | ||||
Sample Code for overloading Sample Code for overriding | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   overloading   overriding   oops concepts   basic interview question   overloading vs overriding Asked in 86 Companies basic   frequent | ||||
Try 1 Question(s) Test | ||||
Frequently asked question for intermediate developers. Frequently asked in HCL Technologies and EPAM. | ||||
| ||||
Ans. Volatile is a declaration that a variable can be accessed by multiple threads and hence shouldnt be cached. | ||||
Sample Code for volatile | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   synchronization   volatile   java keywords Asked in 42 Companies intermediate   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. Builder pattern is the extension of Factory pattern wherein the Builder class builds a complex object in multiple steps. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   design pattern   factory design pattern   builder design pattern Asked in 1 Companies expert | ||||