Archive for advanced java questions

You are browsing the archives of advanced java questions.

Servlet Interview questions for freshers part-I

1. Who maintains the life cycle of the servlet?
Ans: a) Servlet container
b) the client
c) Both a and b
2.Which of the following method is called when the Servlet is first loaded?
a) initialize() method
Ans:b) init() method
c) Both of the above
3.Which of the following is a feature of Servlet?
a) Supports Multithreading
b) Platform independent
c) Protocol independent
Ans:d) All of [...]

Java- Interview questionson JSP for freshers

Web development interview questions
1. Can we use the constructor, instead of init(), to initialize servlet?
- Yes , of course you can use the constructor instead of init(). There’s nothing to stop you. But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was [...]

Java- Technical questions on Servlets

1) What is the servlet?
ANSWER : Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database.
Servlets are to servers what applets are to browsers. Unlike applets, [...]

Java- Technical questions on JDBC

1) What are the steps involved in establishing a connection?
ANSWER : This involves two steps: (1) loading the driver and (2) making the connection.
2) How can you load the drivers?
ANSWER : Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you [...]

java- j2ee interview questions part-v

251. What is renderer
A Java class that can render the output for a set of JavaServer Faces UI components.
252. What is request-response messaging
A method of messaging that includes blocking until a response is received.
253. What is resource adapter
A system-level software driver that is used by an EJB container or an [...]

Java-j2ee interview questions part-III

151. What is JavaServer Pages Standard Tag Library (JSTL)
A tag library that encapsulates core functionality common to many JSP applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization and locale-specific formatting tags, SQL tags, and functions.
152. What is JAXR client
A client [...]

Advanced EJB questions

Q.What is EJB technology for?
Ans:
EJB technology benefits a number of audiences:
Enterprise customers that build and/or deploy EJB-based applications - gain development productivity, can choose from a wide selection of EJB servers, create business logic that runs everywhere and is architecture independent, all this while protecting their existing IT investment!
ISVs and SIs that develop EJB components [...]

Java- EJB questions

Q. Why is there no polymorphic-type response from a create() or find() method?
A. The EJB Specification prohibits this behavior, and the weblogic.ejbc compiler checks for this behavior and prohibits any polymorphic type of response from a create() or find() method.
The reason the create() and find() methods are not polymorphic is similar to the reason constructors [...]

Java- Servlets interview questions

Q. What is servlet?
Ans: Servlets are modules that extend request/response-oriented servers, such as java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database.
Q. What are the classes and interfaces for servlets?
Ans: There are two packages [...]

JDBC questions

Q. What is JDBC ? what are its advantages ?
A. It is an API .The latest version of jdbc api is (3.0).
The JDBC 3.0 API is divided into two packages:
(1) java.sql and (2) javax.sql.
Both packages are included in the J2SE and J2EE platforms.
Advantage:
The JDBC API can be [...]