Java Interview Questions – 48

Java Interview Questions – 48 1. What is the purpose of the wait (), notify (), and notifyAll() methods? The wait() method makes the thread to halt, thus allowing other thread to perform 2. What is the relationship between an event-listener interface and an event-adapter class? An event-listener interface allows describing the methods which must […]

Java Interview Questions -47

Java Interview Questions -47 1. What is deployment-descriptor (web.xml) ? deployment-descriptor is an xml file that provides configuration and deployment information for the web components comprise a Web application. 2. What is web container ? A web container provides the hosting environment to a software component to run in. It is responsible for managing the […]

Java Interview Questions -46

Java Interview Questions -46 1. What is CLASSPATH variable? What is default classpath? CLASSPATH is an environment variable that communicates JVM and other java applications for finding the java language class libraries, including the developer’s class library. 2. Explain how to convert any Java Object into byte array. Create an object of ByteArrayOutputStream class. ByteArrayOutputStream […]

Java Interview Questions -44

Java Interview Questions -44 1.Why should we go for interservlet communication? Servlets running together in the same server communicate with each other in several ways. The three major reasons to use interservlet communication are: a) Direct servlet manipulation – allows to gain access to the other currently loaded servlets and perform certain tasks (through the […]

Java Interview Questions -45

Java Interview Questions -45 1. What is the difference between EJB and Java beans? EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE. 2.What is JDBC abstraction and DAO module? Using this module we can keep up the database code clean and simple, and prevent […]

Java Interview Questions -42

Java Interview Questions -42 1.What is an Aspect? An aspect is the cross-cutting functionality that you are implementing. It is the aspect of your application you are modularizing. An example of an aspect is logging. Logging is something that is required throughout an application. However, because applications tend to be broken down into layers based […]

Java Interview Questions -43

Java Interview Questions -43 1.Are Struts’s action classes Thread-safe? Yes. Action classes are based on “one-instance and many-threads”. This is to conserve resources and to provide the best possible throughput. 2.What are the various Struts Tag libraries? There are various struts tags. But the most-repeated tags are: struts-bean.tld struts-html.tld struts-logic.tld struts-nested.tld 3.What is ActionMapping in […]

Java Interview Questions -41

Java Interview Questions -41 1.What are important ApplicationContext implementations in spring framework? ClassPathXmlApplicationContext – This context loads a context definition from an XML file located in the class path, treating context definition files as class path resources. FileSystemXmlApplicationContext – This context loads a context definition from an XML file in the filesystem. XmlWebApplicationContext – This […]

Java Interview Questions -40

Java Interview Questions -40 1.What is session tracking and how do you track a user session in servlets? Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are: a) User Authentication – occurs when […]

Java Interview Questions -39

Java Interview Questions -39 1.Does Hibernate Session Object has any cache associated with it by default ? Yes, first-level caching is a mandatory requirement for Hibernate Session Object. 2.Is there any cache associated with Hibernate SessionFactory Object? Yes, there is an optional second-level cache with Hibernate SessionFactory object. 3.Can a single Hibernate Session object be […]