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 'EFI' - 14 question(s) found - Order By Rating | ||||
| ||||
Ans. 1. JVM that makes it platform independent and facilitates portability. 2. Garbage Collector that protects from Memory Leaks. 3. Only usage of references and not pointer arithmetic and hence protects the application from memory issues like dangling pointers, memory leaks etc. 4. Support for OOPs that makes application development and maintenance easy. 5. Facilitates library development through use of interface / abstract classes. 6. Facilitates creation of scalable applications. 7. Huge repository of libraries and pool of people with java skill. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  benefits of java  advantages of java basic   frequent | ||||
| ||||
Ans. Immutable objects are thread-safe so you will not have any synchronization issues.Immutable objects are good for Map keys and Set elements, since these typically do not change once created.Immutability makes it easier to write, use and reason about the code (class invariant is established once and then unchanged)Immutability makes it easier to parallelize your program as there are no conflicts among objects.The internal state of your program will be consistent even if you have exceptions.References to immutable objects can be cached as they are not going to change. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  immutable  immutability classes   benefits of immutable  immutability classes Asked in 1 Companies | ||||
| ||||
Ans. With Collection classes , we cannot use primitive types. Moreover for any class using generic types, we cannot use primitive types. They add more functionality by means of additional methods. As their reference can be null , they offer consistent check for uninitialized state. They facilitate caching and reuse by means of constant Pools. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  wrapper classes  benefits of wrapper classes over primitives | ||||
| ||||
Ans. Prepared Statements helps in reuse of database execution plan which can be cached at Database level and hence helps achieving faster execution and performance. As cached ps objects are creating at Database level and not application level, the use and benefit extends across multiple applications. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Prepared statements  benefits of prepared statements Asked in 1 Companies | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. 1. Precompilation , DB-side caching and reuse of same execution plan leads to overall faster execution. 2. Automatic prevention of SQL injection attacks by escaping special characters | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Prepared statements  benefits of prepared statements Asked in 1 Companies | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. Abstraction, Encapsulation, Polymorphism , Composition and Inheritance | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  core oops concepts Asked in 65 Companies basic   frequent | ||||
Frequently asked in high end product companies. | ||||
| ||||
Ans. https://www.geeksforgeeks.org/lru-cache-implementation/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  cache  LRU cache  coding  code Asked in 10 Companies intermediate | ||||
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 | ||||
| ||||
Ans. @Deprecated annotation indicates that the marked element is deprecated and should no longer be used. The compiler generates a warning whenever a program uses a method, class, or field with the @Deprecated annotation. @Override annotation informs the compiler that the element is meant to override an element declared in a superclass. @SuppressWarnings annotation tells the compiler to suppress specific warnings that it would otherwise generate. @SafeVarargs annotation, when applied to a method or constructor, asserts that the code does not perform potentially unsafe operations on its varargsparameter. When this annotation type is used, unchecked warnings relating to varargs usage are suppressed. @FunctionalInterface annotation, introduced in Java SE 8, indicates that the type declaration is intended to be a functional interface, as defined by the Java Language Specification. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   annotations   pre defined annotations | ||||
| ||||
Ans. DTD or Document Type Definition is a standard agreed upon way of communication between two parties. Your application can use a standard DTD to verify that data that you receive from the outside world is valid and can be parsed by your parser. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  xml   markup language   dtd   document type definition   architecture | ||||
| ||||
Ans. All exceptions must be a child of Throwable. If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception class. You want to write a runtime exception, you need to extend the RuntimeException class. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   exceptions   exception handling   user defined exceptions   throwable   architecture   library development   technical architect   technical lead | ||||
Frequently asked question in companies using hibernate. | ||||
| ||||
Ans. 1. First level cache is enabled by default whereas Second level cache needs to be enabled explicitly. 2. First level Cache came with Hibernate 1.0 whereas Second level cache came with Hibernate 3.0. 3. First level Cache is Session specific whereas Second level cache is shared by sessions that is why First level cache is considered local and second level cache is considered global. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hibernate   orm   hibernate cache   architecture   technical lead   first level cache vs second level cache Asked in 18 Companies Intermediate   frequent | ||||
Very frequently asked. Usually followed by questions related to private constructor and synchronized access. Frequently asked in JPMorgan and TCS (Based on 2 feedback) | ||||
| ||||
Ans. http://www.buggybread.com/2014/03/java-design-pattern-singleton-interview.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   design pattern   singleton   at&t   ebay  fidelity india  united healthcare india Asked in 46 Companies intermediate   frequent | ||||
| ||||
Ans. Prefix operator performs the increment and then assignment whereas its inverse for postfix operator. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  prefix increment operator   postfix increment operator   operators   java basic   frequent | ||||