Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Rating | ||||
![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Abstraction Polymorphism Inheritance Encapsulation | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. The external tables feature is a complement to existing SQL Loader functionality. It enables to access data in external sources as if it were in a table in the database. We have used it few times for replicating tables across different database systems. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Yes, with finally. Yes, finally block will be executed even if there is no exception in try block. If finally throws an exception, the exception gets thrown to the calling module. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. jQuery is a cross platform JavaScript library designed to simplify the client-side scripting of HTML. JQuery is the most popular JavaScript library. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. A trigger is a special kind of stored procedure that automatically gets executed upon an event in the database server. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Its a feature wherein database creates unique values incremental values to be stored as primary key for the table. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Stored procedures are a batch of SQL statements along with programming constructs ( if else, loops etc ) and stored as a single program that can be called by different clients and hence reused. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. <a href="http://www.programcreek.com/2009/02/diagram-for-hierarchy-of-exception-classes/" rel="nofollow">http://www.programcreek.com/2009/02/diagram-for-hierarchy-of-exception-classes/</a> | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. TreeSet and TreeMap are used for maintaining sorted elements. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. http://algs4.cs.princeton.edu/11model/BinarySearch.java.html | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. http://www.programcreek.com/2012/11/quicksort-array-in-java/ | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Test Planning -> Test Design -> Test Execution -> Evaluating Exit Criteria and Closure | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Combiners are used to increase the efficiency of a Map Reduce program. They are used to aggregate intermediate map output locally on individual mapper outputs. Combiners can help you reduce the amount of data that needs to be transferred across to the reducers. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Distributed file system and Map Reduce system. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. URI stands for Uniform Resource Indicator URL stands for Uniform Resource Locator URN stands for Uniform Resource Name URI = URL + URN For ex - http://javasearch.buggybread.com/InterviewQuestions/questionSearch.php?keyword=url This is URI. The string from start till .php is URL whereas keyword=url is URN. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. java.util.Collection | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Controller Command is the command that gets called upon a request, just like We have actions in struts and controller in Spring. Task is a step in this bigger process. Task command are the commands that perform specific task for a controller command, like service classes in other frameworks. In order to complete the request, a controller command may invoke multiple task commands. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. 1. Switching Overheads - Even though multi threading aims at improving performance by reducing the wait time and hence improving overall throughput, there is a cost of switching resources between threads and sometime this cost can surpass the benefits if there isnt much wait for IO or external communication. 2. Debugging is hard with multi threaded code. 3. Deadlock - Execution of multi threaded code many a times lead to deadlock due to shared resources. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. As with all other objects its garbage collected after its usage unless its rethrown. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Here is the list of classes that implements Collections Interface - http://www.buggybread.com/2015/02/java-collections-classes-that-implement.html Having Collection interface to extend Cloneable interface would mean necessarily implement clone method by all implementing classes. As not all collection classes allow duplicate elements, it makes no sense to clone elements for them. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Compile This is the default scope. Compile dependencies are available in all classpaths of a project. Moreover, these dependencies are propagated to dependent projects. Provided This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. Runtime This scope indicates that the dependency is not required for compilation, but is for execution. Test This scope indicates that the dependency is is only available for the test compilation and execution phases. This scope is not transitive. System This scope is similar to provided except that you have to provide the JAR which contains it explicitly. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. The simplest way is to ignore them if Maven enforcer plugin is complaining about it but it may lead to runtime problems later. We can do the dependency:tree to see from where these duplicate ones are coming and hence can exclude the duplicate one. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Yes , we have been using this plugin with our projects and its purpose is to warn and stop the Build if there are duplicates of the same package and class are being carried either directly or through transitive dependencies. the duplicate could be coming through different types of dependencies or through different versions of the same dependency. Its purpose is to make sure that there is only one copy thats being used at compile time and runtime and hence shouldnt later result in runtime problems. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Object Oriented Design Patterns is the science of identifying the pattern to make objects communicate in a way to effectively implement a Solution. 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. Advantage of Factory Pattern - Loose Coupling and Segregation of Responsibilities. Now instead of hard binding the complete logic to decide the nature and shape of the object on the basis of some conditions, you are assigning the responsibility to some other object and hence making the relationship loosely coupled and hence main tenable. Disadvantages - Before Understanding the Dis-advantages , we should understand that these patterns were chosen after a period of evolution and research and almost best fit for the required solution, otherwise these patterns would have easily been replaced by now. Though the advantages of these pattern surpass the disadvantages keeping in mind the decreasing cost of resources and increasing scale of applications, but still loose coupling by means of additional objects results in decreased performance. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Enums in Java are used to declare predefined objects and then reuse them. they offer many benefits 1. Enum instance are type safe and thread safe. 2. Enum instances are singleton and hence reused. 3. If we use Enums with Switch , It makes sure that the passed argument is either of its instance and hence provides a safeguard. 4. If we use Enum with Sorted Collections we can sort the elements with a predefined priorities ( as per constant declaration in enum ) 5. We can use Enum as a Factory by defining its constructor. 6. We can store related constant data within enum. For example - If we know the values for the map upfront, we can alternatively use an enum. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. It is an InputSream which is usually connected to the keyboard input of console program. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. For objects or references, == operator check if the reference on left and right points to the same object. For primitive types or variables, == operator check if the variable on left and right holds the same value. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. = is the assignment operator that assigns the result of the expression on the right to the variable on the left, whereas == is the operator to check object equality to see if the reference on left and right are pointing to the same object. For primitive types, its used to check if both variables holds the same value. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. public class BuggyBread { | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Classpath is the parameter for JVM to look for java classes ( .class files ) that are to be looad by class loader | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
![]() ![]() | ||||