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. A static initialization block is a normal block of code enclosed in braces, { }, and preceded by the static keyword. Here is an example:
static {
// whatever code is needed for initialization goes here
}
A class can have any number of static initialization blocks, and they can appear anywhere in the class body. The runtime system guarantees that static initialization blocks are called in the order that they appear in the source code.
Help us improve. Please let us know the company, where you were asked this question :
Constructor provided by Java if no constructor is declared
Constructor with empty body
All of the above
Default Constructor is provided by Java ...
To Reserve Memory
To provide at least one instance method
To Make it look good
To initialize the object state
Usually asked only to fresh graduates and less experienced developers.
Q136. What is a daemon thread? Give an Example ?
Ans. These are threads that normally run at a low priority and provide a basic service to a program or programs when activity on a machine is reduced. garbage collector thread is daemon thread.
Help us improve. Please let us know the company, where you were asked this question :
Ans. The Spring container is able to autowire relationships between collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory without using and elements.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Translation of JSP PageCompilation of JSP PageClassloading (class file is loaded by the classloader)Instantiation (Object of the Generated Servlet is created).Initialization ( jspInit() method is invoked by the container).Reqeust processing ( _jspService() method is invoked by the container).Destroy ( jspDestroy() method is invoked by the container).
Help us improve. Please let us know the company, where you were asked this question :
Q140. What is an applet? What is the lifecycle of an applet?
Ans. Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.
Lifecycle methods of Applet -
init( ) method - Can be called when an applet is first loaded start( ) method - Can be called each time an applet is started paint( ) method - Can be called when the applet is minimized or maximized stop( ) method - Can be used when the browser moves off the applet's page destroy( ) method - Can be called when the browser is finished with the applet
Help us improve. Please let us know the company, where you were asked this question :
Ans. The best practice guideline between settings.xml and pom.xml is that configurations in settings.xml must be specific to the current user and that pom.xml configurations are specific to the project.
Help us improve. Please let us know the company, where you were asked this question :
Ans. By default, the location of the generated jar is in ${project.build.directory} or in your target directory. We can change this by configuring the outputDirectory of maven-jar-plugin.
Help us improve. Please let us know the company, where you were asked this question :
Very Frequently asked. Favorite question in walkins and telephonic interviews. Usually among first few questions. Asked in different variants. Must know for intermediate and expert professionals.Among Top 10 frequently asked questions.
Q145. What is rule regarding overriding equals and hashCode method ?
Ans. Lazy fetching is the technique of not loading the child objects when parent objects are loaded. By default Hibernate does not load child objects. One can specify whether to load them or not while doing the association.
Help us improve. Please let us know the company, where you were asked this question :
Feature to load all objects and relationships in advance before they can be used
Feature to not load dependencies and relationship in advance and load when required
Feature to not load the dependencies and relationships at all
Which of the following is not the benefit of Lazy Initialization in Hibernate ?
Laod When required provides better performance
Object stays lighter
Less number of Database calls
Less load on Database
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. Its a specification that guides the implementation of ORM frameworks. Implementations abiding by the specification would mean that one can be replaced with other in an application without much hassle. Only the Features that are added over the specification needs to be taken care of if any such change is made.
Help us improve. Please let us know the company, where you were asked this question :
Ans. We are using Agile methodology. I attend daily stand up where the development leads takes the status of assigned stories, achievements, any bottlenecks or challenges. We follow iteration of 2 weeks.
Help us improve. Please let us know the company, where you were asked this question :
Ans. I am working as a Software System Analyst that specializes in understanding Business Requirements, Analyzing them , Performs Cost / Benefit analysis, Make suggestions to business , translate the business requirements into technical requirements, Discuss their feasibility with the technical team, performs sizing in coordination with developers and prepare high level design document.
Help us improve. Please let us know the company, where you were asked this question :
Ans. JIRA is written in Java and uses the Pico IOC container,Apache OFBiz entity engine, and WebWork technology stack. For remote procedure calls (RPC), JIRA supports REST, SOAP, and XML RPC.
Help us improve. Please let us know the company, where you were asked this question :