300+ Java, J2ee, Spring,ajax FAQs and Answers [Experienced / Freshers]

Java, J2ee, Spring,ajax Interview Questions And Answers

Question: 1. What Is Ajax?

Answer:

Ajax is abbreviated as Asynchronous Javascript and XML. It is new method used to create better, quicker and greater interactive web systems or programs. Ajax uses asynchronous facts switch among the Browser and the web server.
This method is used to make net quicker and person friendly. It is not a programming language.

Question: 2. What Are Ajax Applications?

Answer:

Browser based totally programs and platform impartial applications are used by Ajax.

Java Script Interview Questions
Question: 3. How Many Types Of Triggers Are Present In Update Panel?

Answer:

There are two sorts of triggers utilized in update panel:
PostBackTrigger – This works as full postback and it cannot paintings asynchronously
AsyncPostBackTrigger – Partial submit lower back asynchronously

Question: four. What Are All The Controls Of Ajax?

Answer:

Following are the controls of Ajax:

ScriptManager
ScriptManagerProxy
UpdatePanel
UpdateProgress
Timer
Java Script Tutorial
Question: five. What Is The Name Of The Dll That Contains Ajax Control Tool Kit?

Answer:

Ajaxcontroltoolkit.Dll is the DLL used for Ajax control device kit and it can be downloaded from the internet. It can be introduced inside the device box or copied at once inside the bin folder.

Adv Java Interview Questions
Question: 6. What Role Of #&& In Querystring?

Answer:

# is handled as fragment delimiter to delimit the history kingdom and && precedes is used to check at the records in the question string.

 

Question: 7. How To Control The Duration Of An Ajax Request?

Answer:

AsyncPostBackTimeout belongings is used to control the length of Ajax request. Deafult fee of this property is 90 seconds.
Example –

Adv Java Tutorial J2SE Interview Questions
Question: 8. What Are The Advantages Of Ajax?

Answer:

Following are the advantages of Ajax:

Bandwidth utilization – It saves reminiscence whilst the data is fetched from the equal web page.
More interactive.
Speeder retrieval of data.
Question: nine. What Are The Disadvantages Of Ajax?

Answer:

Following are the hazards of Ajax:

AJAX is dependent on Javascript. If there may be some Javascript hassle with the browser or in the OS, Ajax will now not support
Ajax may be elaborate in Search engines because it uses Javascript for most of its components.
Source code written in AJAX is without problems human readable. There might be a few security troubles in Ajax.
Debugging is difficult
Increases length of the requests
Slow and unreliable community connection.
Problem with browser again button when the use of AJAX enabled pages.
Core Java Interview Questions
Question: 10. What Is Update Panel?

Answer:

Update panel  is a server control used to update the specified part of a web page. Script Manager desires for use on every occasion replace panel is used. Using replace panel, user cannot cope with outside controls.

Core Java Tutorial
Question: eleven. Which Are The Two Methods Used For Cross Domain Ajax Calls?

Answer:

There are  methods used to switch data among the two greater more safety domain names:
CORS – Cross Origin Resource Sharing and it works with the HTTP web browsers
JSONP – JSON with Padding which works with the HTTP GET and on legacy browsers

Java Struts Interview Questions
Question: 12. What Are All The Technologies Used By Ajax?

Answer:

AJAX makes use of following technology:

JavaScript
XMLHttpRequest
Document Object Model (DOM)
Extensible HTML (XHTML)
Cascading Style Sheets (CSS)
Java Script Interview Questions
Question: 13. What Are All The Features Of Ajax?

Answer:

Following are the features of Ajax and they’re as follows:

Live information binding
Client-aspect template rendering
Declarative instantiation of purchaser components
Observer sample on JavaScript objects and arrays
Invoking ADO.NET records services and information contexts
DataView manage
Hibernate Tutorial
Question: 14. What Is Json In Ajax?

Answer:

JSON is abbreviated as JavaScript Object Notation.
JSON is a secure and reliable facts interchange layout in JavaScript, which is simple to apprehend for each users and machines.
Question: 15. What Are The Pre-necessities To Execute Ajax Applications On A Server?

Answer:

AJAX is a integrated functionality of .NET Framework four.Zero and AJAX utility may be achieved by means of just putting in Microsoft Visual Studio 2010. To use extenders on your programs, you’re required to put in AJAX Control Toolkit and replica the AjaxControlToolkit.Dll file to the Bin listing of your utility.

Hibernate Interview Questions
Question: sixteen. What Is Ajax Framework?

Answer:

ASP.NET AJAX is a unfastened framework to enforce Ajax in asp.Internet web applications. It is used to fast creating green and interactive Web packages that paintings throughout all browsers.

JavaServer Faces (JSF) Tutorial
Question: 17. How Can You Find Out That An Ajax Request Has Been Completed?

Answer:

ReadyState belongings is used to test whether AJAX request has been finished. If the property is identical to 4, then the request has been completed and information is to be had.

 

JavaServer Faces (JSF) Interview Questions
Question: 18. Is Javascript Knowledge Is Required To Do Ajax?

Answer:

Yes, in case you plan to develop new AJAX functionality to your net software.

Adv Java Interview Questions
Question: 19. What Are All The Browsers Support Ajax?

Answer:

Following browsers help AJAX:

Internet Explorer five.0 and above
Opera 7.6 and above
Netscape 7.1 and above
Safari 1.2 and above
Java eight Tutorial
Question: 20. How Can You Test The Ajax Code?

Answer:

JSUnit is the purchaser side javascript code used as a part of JUnit. JSUnit has been used for Ajax code.

Java 8 Interview Questions
Question: 21. Is Ajax Said To Be A Technology Platform Or Is It An Architectural Style?

Answer:

Ajax supports both technology and as architectural style.

Question: 22. How Can Ajax Applications Be Debugged?

Answer:

Two equipment are used for debugging:

Fiddler for IE
Firebug for Mozilla.
JavaFX Tutorial
Question: 23. How Can We Cancel The Xmlhttprequest In Ajax?

Answer:

Abort() approach may be referred to as to cancel the XMLHttpRequest in Ajax.

 

JavaFX Interview Questions
Question: 24. Is Ajax Code Cross Browser Compatible?

Answer:

No, it’s far supporting pass browser compatible. If the browsers helps local XMLHttpRequest JavaScript object, then this could be used.

J2SE Interview Questions
Question: 25. What Is The Name Of Object Used For Ajax Request?

Answer:

XmlHttpRequest item is used for Ajax requests.

NHibernate Tutorial
Question: 26. What Is Prerequisite For Update Panel In Ajax?

Answer:

Script Manager is pre-considered necessary to use Update Panel controls.

NHibernate Interview Questions
Question: 27. How Many Update Panel Can Be Used Per Page?

Answer:

There are not any restrictions on the wide variety of replace panels consistent with web page.

Core Java Interview Questions
Question: 28. What Is Script Manager?

Answer:

Script Manager enables manipulate the consumer side script of AJAX. Script Manager acts as a mediator as AJAX relies upon on JavaScript. Every page that uses AJAX has a Script Manager to allow AJAX libraries.

Spring MVC Framework Tutorial
Question: 29. How Ajax Objects Can Be Created?

Answer:

Following syntax may be used to create Ajax gadgets:
Var sample = New ajaxObject(‘direction of the page’)

Spring MVC Framework Interview Questions
Question: 30. What Are The Protocols Used By Ajax?

Answer:

HTTP’s GET or POST.
XMLHttpRequest for putting a request with the web server.
Uses JSON to communicate between the purchaser and server.
UED or URL encoded information.
Question: 31. What Are All The Security Issues Of Ajax?

Answer:

Security issues that may be encountered

When Ajax calls are despatched thru undeniable textual content and it could result in realize the database details
Inserting scripts can also be viable and attackers can without problems penetrate into the device
The Java Debugger (JDB) Tutorial
Question: 32. How Can We Handle Concurrent Requests?

Answer:

Javascript capabilities need to be written to address concurrent requests and call lower back characteristic can be handed as a parameter. Those parameters are passed to AjaxInteraction(URL, callback) item.

The Java Debugger (JDB) Interview Questions
Question: 33. Define The Role Of The Update Panel?

Answer:

Update Panel is used to feature functionality to the existing ASP.NET programs. By the usage of partial page rendering, it may be used to replace the content. Refresh can be made for the partial web page rather than complete page.

Java Struts Interview Questions
Question: 34. Can We Use Nested Update Panel In Ajax?

Answer:

Yes, we will use nested update panel in Ajax. Update panels may be nested to have more manage over the Page Refresh.

Question: 35. What Are The Types Of Post Back In Ajax?

Answer:

There are  forms of post backs:

Synchronous Postback.
Asynchronous Postback.
Question: 36. How Can We Handle Exception Handling In Ajax?

Answer:

ErrorTemplate that is the child tag of Script Manager is used to address exception handling in Ajax.

 

Hibernate Interview Questions
Question: 37. What Are The Components Of The Asp.Net Ajax Client Library?

Answer:

Following additives are utilized in Ajax client library:

Component Layer
Core Services Layer
Browser Compatibility Layer
Question: 38. What Are The Controls Of The Script Management Group?

Answer:

The controls of script Management group are:

ScriptManager
ScriptManagerProxy
Question: 39. What Are All The Different Data Types That Json Supports?

Answer:

JSON helps following statistics sorts:

String
Number
Boolean
Array
Object
Null
Question: 40. What Are The Goals Of Ajax?

Answer:

The basic dreams of  Ajax are:

Reduced internet server hits.
Reduced Network load.
Interactive person interface.
Platform and structure neutrality.
Support for both synchronous and asynchronous conversation.
Provide a server- and patron-facet framework.
JavaServer Faces (JSF) Interview Questions
Question: forty one. What Is The Difference Between Proxied And Proxyless Calls In Ajax?

Answer:

Proxied calls are made through stub items which can be known as from PHP classes at the JavaScript facet in AJAX.
Proxyless calls are made using application JavaScript functions like HTML_AJAX.Replace() and HTML_AJAX.Append() in AJAX.

Question: forty two. How Many Types Of Ready States In Ajax?

Answer:

There are four geared up states in Ajax:

Initialization.
Request.
Process.
Ready.
Java eight Interview Questions
Question: 43. What Is The Difference Between Registerclientscriptblock, Registerclientscriptinclude And Registerclientscriptresource?

Answer:

Following are the features:
RegisterClientScriptBlock – The script is certain as a string parameter.
RegisterClientScriptInclude – By setting the supply attribute to a URL that factor to a script record.
RegisterClientScriptResource – specifies Resource call in an assembly. The supply characteristic is automatically populated with a URL by means of a name to an HTTP handler that retrieves the named script from the meeting.

  [PDF] Indian Overseas Bank Personal Loan @ 10.90% to 11.40% | Features, Types, Factors, How To Apply? Documents and Interest Rates

Question: 44. Which Request Is Better, Get Or Post?

Answer:

AJAX requests ought to use an HTTP GET request wherein the records does now not trade for a given URL asked.
An HTTP POST must be used when state is up to date on the server. This is enormously advocated for a consistent web software architecture.

Question: 45. What Are The Limitations Of Ajax?

Answer:

An Ajax Web Application tends to confuse end customers if the community bandwidth is slow and there’s no full postback jogging.

 

Question: forty six. What Is Spring Framework?

Answer:

Spring is one of the maximum widely used Java EE framework. Spring framework middle concepts are “Dependency Injection” and “Aspect Oriented Programming”.
Spring framework may be used in regular java programs additionally to gain loose coupling among one of a kind components by implementing dependency injection and we will carry out cross cutting duties inclusive of logging and authentication using spring aid for aspect oriented programming..

Question: forty seven. What Do You Understand By Dependency Injection?

Answer:

Dependency Injection layout pattern allows us to dispose of the hard-coded dependencies and make our application loosely coupled, extendable and maintainable. We can implement dependency injection pattern to transport the dependency decision from assemble-time to runtime.
Some of the benefits of the usage of Dependency Injection are: Separation of Concerns, Boilerplate Code discount, Configurable additives and smooth unit trying out.

Question: 48. What Are Advices In Spring?

Answer:

It is the execution of an aspect. Advice is like making your utility research a new trick. They are usually added at joinpoints.

Question: forty nine. What Is The Default Scope Of Bean In Spring Framework?

Answer:

The default scope of bean is Singleton for Spring framework.

Question: 50. Name The Types Of Transaction Management That Are Supported By Spring?

Answer:

Transaction management supported with the aid of Spring are :

 Declarative transaction management.
 Programmatic transaction control.
Question: fifty one. Is Singleton Beans Are Thread Safe In Spring Framework?

Answer:

No, singleton beans are not thread-safe in Spring framework.

 

Question: fifty two. What Are The Benefits Of Spring Framework?

Answer:

Following are the benefits of Spring framework:

Extensive utilization of Components.
Reusability.
Decoupling.
Reduces coding effort through the usage of pattern implementations which includes singleton, factory, service locator etc.
Removal of leaking connections.
Declarative transaction management.
Easy to combine with third celebration gear and technologies.
Question: fifty three. What Is Bean Factory?

Answer:

Bean Factory is center of the spring framework and, it’s miles a Lightweight container which masses bean definitions and manages your beans.  Beans are configured the usage of XML file and control singleton described bean. It is also liable for lifestyles cycle methods and injects dependencies. It additionally gets rid of adhoc singletons and factories.

Question: fifty four. Define Bean Wiring?

Answer:

Bean wiring is the advent of institutions among application additives which can be between the beans in a specific spring field.

 

Question: fifty five. What Is Called Spring Mvc?

Answer:

A Spring MVC is a unmarried shared controller example and it’s far used to deal with request type controllers, interceptors which run in the IoC container. It additionally lets in multiple Dispatcher Servlets that could proportion software context interface however not class based totally interface.

Question: fifty six. Why Spring Framework Is Needed?

Answer:

Spring framework is wanted because it’s miles –

Very Light Weight Container
Framework
IOC
AOP
Question: 57. Name The Various Modules Used In Spring Framework?

Answer:

AOP module (Aspect Oriented Programming)
JDBC abstraction and DAO module
The Core container module
MVC framework module
Application context module
O/R mapping integration module (Object/Relational)
Web module
Question: 58. Explain The Rowcallbackhandler In Spring?

Answer:

The RowCallbackHandler is known as for each row in ResultSet and is used to read values from the ResultSet.

Question: 59. Define Application Context Module?

Answer:

This is a completely important module and components diverse important services like EJB integration, remoting, JNDI get admission to and scheduling. It transforms spring right into a framework. It also broadens the concept of BeanFactory by using application of lifecycle occasions, offering assist for internationalization messages and validation.

Question: 60. Write About Aop Module?

Answer:

AOP module is utilized for developing aspects for Spring packages. It additionally allows guide for metadata programming in Spring.

Question: 61. What Is A Beanfactory Interface?

Answer:

Bean manufacturing facility interface is used to offer configuration framework for object creation and simple capability around object management.

 

Question: 62. What Is Auto Wiring?

Answer:

Autowiring is used to construct relationships among the taking part beans. Spring container can routinely solve collaborators for beans.

Question: 63. What Are The Different Modes Of Autowiring?

Answer:

Autowiring has 5 extraordinary modes:

no: no autowire.
ByName : Autowiring that can be completed by using assets call.
ByType : property kind as autowired.
Constructor: It is just like byType and it’s miles assets is in constructor.
Autodetect :  Spring is permitted to choose autowiring from byType or constructor.
Question: 64. How To Start Using Spring?

Answer:

Following steps wishes to be achieved first of all the Spring:

Download Spring and its dependent file from spring’s site.
Create software context xml to define beans and its dependencies.
Integrate utility context xml with web.Xml.
Deploy and Run the software.
Question: sixty five. What Are The Methods Of Bean Life Cycle?

Answer:

There are  critical techniques of Bean existence cycle:
Setup – referred to as while bean is loaded into box.
Teardown – known as when bean is unloaded into container.

Question: 66. What Are The Different Types Of Events Of Listeners?

Answer:

Following are the specific forms of occasions of listeners:
ContextClosedEvent – This occasion is referred to as whilst the context is closed.
ContextRefreshedEvent – This event is known as whilst context is initialized or refreshed.
RequestHandledEvent – This occasion is referred to as whilst the web context handles request.

Question: sixty seven. Differentiate Between Singleton And Prototype Bean?

Answer:

Singleton approach best one bean is defined in step with item example whilst Prototype manner one definition to a couple of object times in Spring.

Question: sixty eight. What Are The Types Of Dependency Injection?

Answer:

Two kinds of dependency injection are supported via spring framework:

Setter Injection
Constructor Injection
Question: 69. Write About Core Container Module?

Answer:

Core field module is chargeable for the simple capability of the spring framework. The whole Spring framework is built with this module as a base.

 

Question: 70. What Is Aop Module?

Answer:

This AOP module is used for spring enabled software. Support has been supplied AOP alliance to make sure the interoperability among spring and other AOP frameworks.
It instructs spring to add annotations to the supply code and inform how to apply factors.

Question: 71. What Is Aop Alliance?

Answer:

AOP alliance is an open-supply venture which is geared toward selling adoption of AOP. The AOP alliance’s purpose is to outline a common set of components and interfaces with a purpose to enhance interoperability amongst one-of-a-kind AOP implementations.

Question: 72. What Is Called Spring Configuration File?

Answer:

Spring configuration document is an XML file and it incorporates elegance facts. It also describes how these classes are configured and interact with each other.

Question: 73. What Are Different Types Of Autowire?

Answer:

There are 4 exceptional kinds of Auto wire:

byName
byType
constructor
autodetect
Question: 74. What Are The Types Of The Transaction Management That Is Supported By Spring?

Answer:

Following are the types of transaction management that has been supported by spring:

Declarative.
Programmatically.
Question: 75. When Are Declarative And Programmatic Transaction Management Used?

Answer:

When most effective a small amount of transactional operations is there, it’s miles counseled to use Programmatic transaction control. But if there’s a large quantity of transactional operations to be looked after, declarative transaction management is favored.

Question: 76. What Is Ioc?

Answer:

IOC (Inversion of Control sample) is likewise referred to as dependency injection. IOC directs the programmers to depict how to create items rather of actually creating them. But on this design pattern, this control has been given to assembler and assembler will instantiate required magnificence if wanted.

Question: 77. Write About The Different Types Of Listener Related Events?

Answer:

The distinct varieties of activities associated with listeners are:

ContextRefreshedEvent – This receives known as when the context is refreshed or initialized.
RequestHandledEvent – This receives referred to as while the net context is dealing with a request.
ContextClosedEvent – This receives referred to as whilst the context receives closed.
Question: 78. What Is Called An Advice?

Answer:

Advice will tell application on new conduct and it’s miles the implementation of an issue. It is inserted into an software on the joinpoint.
Advice is the implementation of an component. It is something like telling your utility of a new conduct. Generally, the recommendation is inserted into an utility at joinpoints.

Question: seventy nine. What Is A Joinpoint?

Answer:

The point in which an component can be brought inside the application is called a joinpoint. This factor will be a discipline being changed, a method being called or maybe an exception being thrown. At these factors, the brand new element’s code may be delivered to introduce a brand new conduct to the software.
Aspect code may be inserted at this factor into regular go with the flow of software to alternate the current conduct.

Question: eighty. What Is An Aspect?

Answer:

Aspect is likewise referred to as as logging that is required at some point of the utility. Logging or issue is a move cutting capability in an utility the use of AOP.

 

Question: eighty one. What Is A Pointcut?

Answer:

Pointcut is used to permit where the advice can be applied.

Question: 82. What Is Weaving?

Answer:

Weaving is used to create new proxy object by applying aspects to goal object.

Question: eighty three. What Is Difference Between Singleton And Prototype Bean?

Answer:

Singleton Bean – Single bean definition to a single item instance in keeping with Spring IOC container
Prototype Bean – Single bean definition to any wide variety of object times according to Spring IOC Container

  300+ Production And Operations Management FAQs and Answers [Experienced / Freshers]

Question: eighty four. Explain The Term Proxy?

Answer:

The time period proxy refers to an object that’s produced the application of an recommendation to the target item.

 

Question: 85. What Is Cross Cutting Concern And Concern In Spring Aop?

Answer:

Cross cutting subject:  It is a challenge that’s applicable during the utility and it affects the entire software. E.G Security, logging and records transfer are the concerns that are wanted in almost every module of an utility.
Concern: Concern is a behavior that we need to have in a module of an software. Issues wherein we’re involved defines our problem.

Question: 86. What Is Dataaccessexception?

Answer:

DataAccessException is a RuntimeException. It is an Unchecked Exception. The consumer can not be forced to address those varieties of exceptions.

Question: 87. What Is The Web Module?

Answer:

The web module enables the introduction of an internet utility without XML. The internet.Xml record desires to be configured for using the internet module.

Question: 88. What Are Orm Integration Modules?

Answer:

Object/relational mapping (ORM) device is supported through Spring over directly JDBC via imposing the ORM module. Spring can be a part of diverse important ORM frameworks, together with JDO, iBATIS SQL Maps and Hibernate.

Question: 89. What Is The Better Method Of Using Jdbc In Spring?

Answer:

If JDBC is used with the template class known as JdbcTemplate, it offers a better overall performance.

Question: ninety. What Exceptions Do The Dao Classes, Use In Spring Throw?

Answer:

In spring DAO classes most effective throws SQLException.

Question: ninety one. What Is Javaserver Faces Conversion Model?

Answer:

A mechanism for converting among string-based totally markup generated by using JavaServer Faces UI components and server-side Java objects.

Question: ninety two. What Is Javaserver Faces Event And Listener Model?

Answer:

A mechanism for determining how activities emitted by means of JavaServer Faces UI components are dealt with. This version is based on the JavaBeans aspect occasion and listener version.

Question: ninety three. What Is Javaserver Faces Expression Language?

Answer:

A easy expression language used by a JavaServer Faces UI thing tag attributes to bind the related issue to a bean property or to bind the associated element’s fee to a method or an external statistics source, such as a bean belongings. Unlike JSP EL expressions, JavaServer Faces EL expressions are evaluated by way of the JavaServer Faces implementation rather than with the aid of the Web field.

Question: 94. What Is Javaserver Faces Navigation Model?

Answer:

A mechanism for outlining the collection in which pages in a JavaServer Faces application are displayed.

 

Question: 95. What Is Javaserver Faces Ui Component?

Answer:

A person interface control that outputs statistics to a purchaser or allows a consumer to enter statistics to a JavaServer Faces application.

Question: 96. What Is Javaserver Faces Ui Component Class?

Answer:

A JavaServer Faces class that defines the conduct and homes of a JavaServer Faces UI factor.

Question: 97. What Is Javaserver Faces Validation Model?

Answer:

A mechanism for validating the facts a consumer inputs to a JavaServer Faces UI issue.

Question: 98. What Is Java Server Pages (jsp)?

Answer:

An extensible Web technology that makes use of static data, JSP factors, and server-side Java items to generate dynamic content for a patron. Typically the static facts is HTML or XML factors, and in many cases the consumer is a Web browser.

Question: 99. What Is Java Server Pages Standard Tag Library (jstl)?

Answer:

A tag library that encapsulates middle functionality commonplace to many JSP applications. JSTL has aid for common, structural obligations which include new release and conditionals, tags for manipulating XML files, internationalization and locale-specific formatting tags, SQL tags, and capabilities.

Question: a hundred. What Is Jaxr Client?

Answer:

A client application that uses the JAXR API to get admission to a commercial enterprise registry thru a JAXR provider.

Question: 101. What Is Jaxr Provider?

Answer:

An implementation of the JAXR API that offers get admission to to a specific registry issuer or to a category of registry vendors which are based on a not unusual specification.

 

Question: 102. What Is Jdbc?

Answer:

An JDBC for database-impartial connectivity between the J2EE platform and a wide variety of records assets.

 

Question: 103. What Is Jms Administered Object?

Answer:

A preconfigured JMS object (a resource manager connection manufacturing facility or a destination) created by way of an administrator for the use of JMS customers and positioned in a JNDI namespace.

Question: 104. What Is Jms Application?

Answer:

One or extra JMS clients that alternate messages.

Question: a hundred and five. What Is Jms Client?

Answer:

A Java language software that sends or receives messages.

Question: 106. What Is Jms Provider?

Answer:

A messaging device that implements the Java Message Service as well as other administrative and manage capability needed in a full-featured messaging product.

Question: 107. What Is “software Client”?

Answer:

A first-tier J2EE customer thing that executes in its personal Java virtual device. Application clients have get entry to to some J2EE platform APIs.

Question: 108. What Is “software Client Container”?

Answer:

A container that helps software customer components.

Question: 109. What Is “application Client Module”?

Answer:

A software unit that consists of one or extra training and an software patron deployment descriptor.

Question: one hundred ten. What Is “utility Component Provider”?

Answer:

A seller that gives the Java lessons that enforce components’ strategies, JSP page definitions, and any required deployment descriptors.

Question: 111. What Is “software Configuration Resource File”?

Answer:

An XML record used to configure sources for a Java Server Faces application, to outline navigation regulations for the application, and to register converters, Validator, listeners, renders, and additives with the application.

Question: 112. What Is “archiving”?

Answer:

The technique of saving the state of an object and restoring it.

Question: 113. What Is “asant”?

Answer:

A Java-primarily based construct device that can be extended using Java classes. The configuration files are XML-based totally, calling out a goal tree wherein numerous tasks get executed.

 

Question: 114. What Is “attribute”?

Answer:

A qualifier on an XML tag that provides extra statistics.

Question: a hundred and fifteen. What Is Authentication?

Answer:

The system that verifies the identification of a user, device, or other entity in a computer system, normally as a prerequisite to permitting get right of entry to to resources in a device. The Java servlet specification requires three varieties of authentication-fundamental, form-primarily based, and mutual-and supports digest authentication.

Question: 116. What Is Authorization?

Answer:

The manner by which get right of entry to to a method or resource is determined. Authorization relies upon at the determination of whether the foremost associated with a request thru authentication is in a given protection position. A security position is a logical grouping of users described by way of the individual that assembles the application. A deployer maps security roles to safety identities. Security identities may be principals or groups within the operational environment.

Question: 117. What Is Authorization Constraint?

Answer:

An authorization rule that determines who’s accredited to get entry to a Web useful resource collection.

Question: 118. What Is Backing Bean?

Answer:

A JavaBeans issue that corresponds to a JSP page that includes JavaServer Faces additives. The backing bean defines homes for the additives at the page and methods that perform processing for the issue. This processing consists of occasion managing, validation, and processing associated with navigation.

Question: 119. What Is Basic Authentication?

Answer:

An authentication mechanism in which a Web server authenticates an entity via a user call and password obtained the use of the Web application’s built-in authentication mechanism.

Question: a hundred and twenty. What Is Bean-managed Persistence?

Answer:

The mechanism whereby facts switch among an entity bean’s variables and a resource manager is controlled by way of the entity bean.

Question: 121. What Is Bean-controlled Transaction?

Answer:

A transaction whose boundaries are defined through an employer bean.

Question: 122. What Is Binding (xml)?

Answer:

Generating the code had to technique a nicely-defined portion of XML facts.

Question: 123. What Is J2ee?

Answer:

J2EE is an surroundings for growing and deploying organization packages. The J2EE platform includes a set of offerings, application programming interfaces (APIs), and protocols that offer the functionality for growing multitier, web-based programs.

Question: 124. What Is The J2ee Module?

Answer:

A J2EE module includes one or greater J2EE additives for the same box type and one factor deployment descriptor of that kind.

Question: a hundred twenty five. What Are The Components Of J2ee Application?

Answer:

A J2EE issue is a self-contained purposeful software unit this is assembled into a J2EE software with its related instructions and documents and communicates with other additives. The J2EE specification defines the subsequent J2EE components: 

   Application customers and applets are client components. 
   Java Servlet and JavaServer PagesTM (JSPTM) generation additives are net additives.
   Enterprise JavaBeansTM (EJBTM) additives (employer beans) are business additives.
   Resource adapter components provided by means of EIS and device vendors.
Question: 126. What Are The Four Types Of J2ee Modules?

Answer:

1. Application purchaser module
2. Web module 
three. Enterprise JavaBeans module 
four. Resource adapter module

Question: 127. What Does Application Client Module Contain?

Answer:

The application customer module incorporates:

magnificence documents, 
an application patron deployment descriptor.
Application patron modules are packaged as JAR files with a .Jar extension.

Question: 128. What Does Web Module Contain?

Answer:

The internet module includes:

JSP documents,
elegance files for servlets,
GIF and HTML files, and 
a Web deployment descriptor. 
Web modules are packaged as JAR documents with a .Struggle (Web ARchive) extension.

Question: 129. What Is “applet”?

Answer:

A J2EE element that generally executes in a Web browser but can execute in a diffusion of different packages or devices that aid the applet programming model.

Question: one hundred thirty. What Is “applet Container”?

Answer:

A field that includes support for the applet programming model.

Question: 131. What Is “utility Assembler”?

Answer:

A individual who combines J2EE components and modules into deployable utility units.

Question: 132. Write A Code To Sort A List Of Strings Using Java eight Lambda Expression?

Answer:

. Private void sortUsingJava8(List names)

Collections.Type(names, (p1, p2) -> p1.CompareTo(p2));

Question: 133. What Is Meant By Binding In Rmi?

Answer:

Binding is the process of associating or registering a call for a remote object, which can be used as a similarly, that allows you to look up that faraway item. A far flung object may be related to a call the usage of the bind / rebind methods of the Naming elegance.

Question: 134. What Is The Front Controller Class Of Spring Mvc?

Answer:

  300+ Engineering Drawing FAQs and Answers [Experienced / Freshers]

The Dispatcher Servlet magnificence works because the the front controller in Spring MVC.

Question: 135. What Are The States Of An Object In Hibernate?

Answer:

The states of an item in hibernate are

Transient
Persistent
Detached
Transient: The item is within the brief country if it’s miles simply created but has no number one key (identifier) and it isn’t always associated with the consultation.
Persistent: The object is in the persistent country if the session is open, and we simply stored the example within the database or retrieved the instance from the database.
Detached: The item is within the detached kingdom if the consultation is closed. After indifferent kingdom, the item involves chronic state if we call lock() or replace() technique.

Question: 136. How To Make An Immutable Class In Hibernate?

Answer:

If we mark a class as mutable=”fake”, the class may be dealt with as an immutable elegance. The default price of mutable is “real”.

Question: 137. What Is Hash-collision In Hashtable? How Was It Handled In Java?

Answer:

In Hashtable , if two different keys have the equal hash value then it leads to hash -collision. A bucket of type related list used to preserve the different keys of same hash fee.

Question: 138. Write A Syntax To Convert A Given Collection To Synchronizedcollection ?

Answer:

Collections.SynchronizedCollection(Collection collectionObj) will convert a given series to synchronized collection.

Question: 139. Write A Code To Make Collections Readonly?

Answer:

We could make the Collection readOnly via using the following strains code:

General : Collections.UnmodifiableCollection(Collection c)Collections.UnmodifiableMap(Map m)

Collections.UnmodifiableList(List l)

Collections.UnmodifiableSet(Set s)

Question: one hundred forty. Mention The Uses Of Synchronized Block

Answer:

We are the usage of Synchronized block due to the fact
• It helps to fasten an item for each shared useful resource.
• The scope of synchronized block is smaller than the method.

Question: 141. What Are The Functions Of Hashcode() Method?

Answer:

This method returns a hash code fee (an integer quantity).
And additionally returns the equal integer range, if two keys (through calling equals() technique) are same.
But in once in a while two hash code numbers will have exceptional or same keys.
Question: 142. What Is The Default Size Of Load Factor In Hashing Based Collection?

Answer:

Default Size = 0.Seventy five. The default potential is computed as preliminary potential * load issue.

Question: 143. What Are The Differences Between The Jsp Custom Tags & Java Beans?

Answer:

• Custom tags can manipulate JSP content material, but beans can’t.
• Composite operations can be decreased to a significantly less complicated form with custom tags than with beans.
• Custom tags require reasonably a piece extra paintings to set up than do beans.
• Custom tags are available most effective in JSP 1.1 and so forth, but beans can be utilized in all JSP 1.X variations

Question: 144. Explain Expression Language In Jsp?

Answer:

The expression language is utilized in JSP to simplify the accessibility of gadgets and It offers many gadgets that can be used directly like param, requestScope, sessionScope, applicationScope, request, session etc.

Question: a hundred forty five. Define The Implicit Object?

Answer:

JSP implicit objects are those Java gadgets that the JSP Container makes available to builders in every page. A developer can capable to name them directly, without being explicitly declared. JSP Implicit Objects are also called pre-described variables. The following gadgets are taken into consideration implicit in a JSP page:
• application
• page
• request
• response
• consultation
• exception
• out
• config
• pageContext

Question: 146. Define A Cookie And What Are The Difference Between Session And Cookie?

Answer:

A cookie is a small piece of facts, this piece of records sends to the browser by way of a web server. The browser shops the cookies for every Web server in a local file. In a future request or future reference, the browser sends all saved cookies for that particular Web server.
The difference between cookies and classes are:
• The consultation is working, regardless of the settings at the client browser. The customer may additionally have decided on to disable cookies.
• The consultation and cookies also differ in storing the amount of facts. The HTTP consultation is able to store any Java object, whilst a cookie can most effective keep String objects.

Question: 147. What Is Http Tunneling?

Answer:

HTTP Tunneling is a technique by means of which, communications executed using diverse community protocols are encapsulated using the HTTPS protocols. The HTTP protocol, consequently, acts as a wrapper for a channel that the community protocol being tunneled use to speaking. The masking of other protocol requests as HTTP requests is HTTP Tunneling.

Question: 148. What Is A Function Of Ioc Container In Spring?

Answer:

IOC field is responsible to:
• create the example
• configure the instance, and
• collect the dependencies

Question: 149. What Is Lazy Loading In Hibernate?

Answer:

Lazy loading in hibernate improves the overall performance. It loads the kid objects on demand.
At the same time as Hibernate three, lazy loading is enabled by default, we don’t need to do lazy=”genuine”. It way now not to load the kid items whilst a determine is loaded.

Question: one hundred fifty. How Can We Fetch Records By Spring Jdbctemplate?

Answer:

We can fetch records from the database with the aid of the question technique of JdbcTemplate. There are  interfaces to do that:
1. ResultSetExtractor
2. RowMapper

Question: 151. Are Constructors Inherited? Can A Subclass Call The Parent’s Class Constructor?

Answer:

We cannot inherit a constructor. We create an instance of a subclass using a constructor of certainly one of its superclass. Because override the superclass constructor isn’t always our want so that, we override a superclass constructor, then we smash the encapsulation abilties of the language.

Question: 152. Define Json?

Answer:

Expansion of JSON is “JavaScript Object Notation”, It is a much lighter and readable opportunity to XML. It is an independent and without difficulty parse-in a position in all programming languages. It is by and large used for Communicating between purchaser – server or server -server conversation. It is a far lighter and readable opportunity to XML.

Question: 153. What Are The Advantages Of Json Over Xml?

Answer:

The benefits of JSON over XML are
1. JSON is Lighter and faster than XML.
2. Better understandable.
Three. Easy to parse and conversion to items for records consumption.
4. Support a couple of facts kinds – JSON aid string, quantity, array, Boolean but XML facts are all strings.

Question: 154. Name The Methods Of Object Class?

Answer:

clone() – This approach allows to create and return a copy of the item.
Equals() – This approach allows to evaluate.
Finalize() – Called by using the rubbish collector on an item.
GetClass() – It facilitates to return the runtime class of an object.
HashCode() – Helps to go back a hash code cost for the object.
ToString() – enables to return a string illustration of the object.
Notify(), notifyAll(), and wait() – It facilitates to synchronize the sports of independently running threads in a software.

Question: one hundred fifty five. Define Content Negotiation?

Answer:

If we’ve got visited website to looking the facts, we can get the statistics in distinctive languages and in one of a kind formats while a client makes an HTTP request to a server, the patron can also specify the media sorts here. The client can specify what it could be given returned from the host and on the premise of availability the host will return to the purchaser. This is called content negotiation because purchaser and server negotiated at the language and layout of the content material to be shared.

Question: 156. Can We Import Same Package/class Two Times? Will The Jvm Load The Package Twice At Runtime?

Answer:

Yes, we will import the equal package/magnificence a couple of times. Compiler and JVM aren’t complaining about it. And the JVM will internally load the magnificence simplest as soon as regardless of how oftentimes we import the identical magnificence.

Question: 157. Define Abstract Class?

Answer:

A elegance which includes the summary key-word in its announcement is referred to as abstract class. It can have abstract and non-summary techniques (approach with body).
1. This class will have public, non-public, protected or constants and default variables.
2. It wishes to be prolonged and its technique implemented. It can not be instantiated.
3. If a category has at the least one abstract approach, then the magnificence ought to be declared summary.

Question: 158. Describe The Annotations?

Answer:

It is a shape of metadata and it affords data approximately a program that isn’t always a part of this system itself. An annotation has no direct impact at the operation of the code they annotate.
Uses of Annotations :
• Information for the compiler — It may be utilized by the compiler to locate mistakes or suppress warnings.
• Compile-time and deployment-time processing — a few software program equipment can method annotation statistics to generate code, XML documents, and so on.
• Runtime processing — few annotations are available to be tested at runtime.

Question: 159. Java Doesn’t Use Pointers. Why?

Answer:

Pointers are prone and slight carelessness in their use may additionally result in memory troubles and as a result Java essentially manages their use.

Question: one hundred sixty. Distinguish Between Static Loading And Dynamic Class Loading?

Answer:

Static loading – Classes are loaded statically with operator “new”.
Dynamic class loading – It is a method for programmatically invoking the features of a category loader at run time.
The syntax isClass.ForName (Test className);

Question: 161. Explain Struts 1 Classes Are Not Thread Safe Whereas Struts 2 Classes Are Thread Safe?

Answer:

Struts 1 movements are a singleton. So all threads operate at the unmarried action object and for this reason make it thread-risky.Struts 2 moves are not a singleton and a new action object copy are created each time a brand new motion request is made and as a result it threads safe.

Question: 162. Define Jaxp & Jaxb?

Answer:

JAXP: – Stands for Java API for XML Processing. This presents a not unusual interface for creating and using DOM, SAX, and XSLT APIs in Java irrespective of which vendor’s implementation is truly being used.
JAXB: – It Stands for Java API for XML Binding. This widespread defines a gadget for a script out Java objects as XML and for creating Java objects from XML structures.

Question: 163. Define

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top