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.
Ans. ClassPath is the path where Java looks for class files to resolve the dependencies. For example - If you are using a class "xyz" in your code and have specified the respective import, Where should Java look for the definition of xyz. Java determines using the class path settings.
Help us improve. Please let us know the company, where you were asked this question :
Ans. RI or Reference Implementation is a sample implementation provided for the API's / Specs, usually by their developers. This is usually a part of API documentation.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  reference implementation   help docs   helpdocs   api   apis   api specs   documentation   rare
Q34. Explain the challenging problems you faced recently and how you overcame it ?
Ans. Audit Tables generally stores Raw information to be reviewed in case of problems or determining impact. If Database space is an issue , and the audit information is rarely retrieved, one design could be to use compressed file system.
Help us improve. Please let us know the company, where you were asked this question :
Ans. The prototype pattern is a creational design pattern. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. 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 :
Ans. Synchronize is used to achieve mutual exclusion i.e at one time, the segment of the code, method that has been declared synchronized should be executed by single thread only and hence the lock needs to be retrieved before executing the segment and then released.
Help us improve. Please let us know the company, where you were asked this question :
Ans. This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases. This scope is not transitive.
Help us improve. Please let us know the company, where you were asked this question :
Ans. A dirty read occurs when a transaction is allowed to read data from a row that has been modified by another running transaction but not yet committed.
Help us improve. Please let us know the company, where you were asked this question :
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 :
Ans. Yes we can have a main method with string[] argument in every class of an application. When we execute an app we specify the starting point i.e the class that will get the control first and hence main method of that class gets executed.
Help us improve. Please let us know the company, where you were asked this question :
Ans. 1. Security and Safety - They can be shared across multiple threads as they are thread safe. Moreover, it protects then from bad state due to interception by the other code segment. One such problem due to mutability and access by alternate code segment could be the change of hash code and then the impact on its search with hash collections.
2. Reuse - In some cases they can be reused as only one copy would exist and hence it can be relied upon. For example - String Pool
Help us improve. Please let us know the company, where you were asked this question :
Ans. Generally Rest services don't have any registry like we have WSDL is SOAP and hence don't have a way to know the end points without looking at either the url mapping in controller or client code. Some restful service publish WADL (Web Application Description Language) and hence clients can locate the service end points.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Every fresh session having its own cache memory, Caching is a mechanism for storing the loaded objects into cache memory. The advantage of cache mechanism is, whenever again we want to load the same object from the database then instead of hitting the database once again, it loads from the local cache memory only, so that the no. of round trips between an application and a database server got decreased. It means caching mechanism increases the performance of the application.
In hibernate we have two levels of caching
First Level Cache [ or ] Session Cache
Second Level Cache [ or ] Session Factory Cache [ or ] JVM Level Cache
Help us improve. Please let us know the company, where you were asked this question :
Ans. data under collection are actually stored in memory so that they can be retrieved when needed whereas data in streams are not stored and hence we need to construct it again when needed.
Help us improve. Please let us know the company, where you were asked this question :