• No results found

Java All Interview Question Prepared by Abhinav

N/A
N/A
Protected

Academic year: 2021

Share "Java All Interview Question Prepared by Abhinav"

Copied!
153
0
0

Loading.... (view fulltext now)

Full text

(1)

TABLE OF CONTENT page 1. class and interface Based Interview Questions 1-11

2. JDBC Interview Questions 12-18 3. SERVLET FAQ 1 19-27 4.SERVLET FAQ 2 28-34 5.SESSION FAQ 34-37 6. JSP FAQ 38-47 7.STRUTS FAQ1 48-63 8.STRUTS FAQ2 64-88 9.SPRING FAQ 10. JAVA FAQ1 89-98 11.JAVA FAQ2 99-110 12.OOP FAQ 111-113 13.SPRING FAQ 114-117 14.EXCEPTION FAQ 118-124 15 COLLECTION FAQ 125-130 16 COLLECTION FAQ2 131-140

17 MULTI THREADING FAQ 141-154

18 OBJECT BASED FAQ 19 http://java4732.blogspot.in

(2)

20 GARBAGE COLLCETION FAQ 21 SERIALIZATION FAQ

http://www.developersbook.com/

class and interface Based Interview Questions

1. What's the difference between an interface and an abstract class?

An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.

2. Can an inner class declared inside of a method access local variables of this method?

Yes, it is possible if the variables are declared as final.

3. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?

Sometimes. But your class may be a descendent of another class and in this case the interface is your only option because Java does not support multiple inheritance.

4. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?

You do not need to specify any access level, and Java will use a default package access level. A class with default access will be accessible only to other classes that are declared in the same directory/package.

5. When you declare a method as abstract method ?

We declare a method as abstract, When we want child class to implement the behavior of the method.

(3)

6. Can I call a abstract method from a non abstract method ?

Yes, We can call a abstract method from a Non abstract method in a Java abstract class

7. What is the difference between an Abstract class and Interface in Java ? or can you explain when you use Abstract classes ?

Abstract classes let you define some behavior while forcing your subclasses to provide the rest. These abstract classes will provide the basic funcationality of your application, child class which inherit this class will provide the funtionality of the abstract methods in abstract class.

Whereas, An Interface can only declare constants and instance methods, but cannot implement any default behavior.

If you want your class to extend some other class but at the same time re-use some features outlined in a parent class/interface - Interfaces are your only option because Java does not allow multiple inheritance and once you extend an abstract class, you cannot extend any other class. But, if you implement an interface, you are free to extend any other concrete class as per your wish. Also, Interfaces are slow as it requires extra indirection to find corresponding method in the actual class. Abstract classes are fast.

8. What are different types of inner classes ?

Inner classes nest within other classes. A normal class is a direct member of a package. Inner classes are of four types

1. Static member classes 2. Member classes

3. Local classes

4. Anonymous classes

9. What are the field/method access levels (specifiers) and class access levels ?

(4)

Each field and method has an access level corresponding to it: private: accessible only in this class

package: accessible only in this package

protected: accessible only in this package and in all subclasses of this class public: accessible everywhere this class is available

Similarly, each class has one of two possible access levels:

package: class objects can only be declared and manipulated by code in this package

public: class objects can be declared and manipulated by code in any package

10. What modifiers may be used with an inner class that is a member of an outer class?

A non-local inner class may be declared as public, protected, private, static, final, or abstract.

11. Can an anonymous class be declared as implementing an interface and extending a class?

An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.

12. What must a class do to implement an interface?

It must provide implementation to all of the methods in the interface and identify the interface in its implements clause in the class declaration line of code.

13. What is the difference between a static and a non-static inner class?

A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.

14. When can an object reference be cast to an interface reference?

An object reference be cast to an interface reference when the object implements the referenced interface.

(5)

15. If a class is declared without any access modifiers, where may the class be accessed?

A class that is declared without any access modifiers is said to have default or package level access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.

16. Which class should you use to obtain design information about an object?

The Class class is used to obtain information about an object's design.

17. What modifiers may be used with an interface declaration?

An interface may be declared as public or abstract.

18. Is a class a subclass of itself?

Yes, a class is a subclass of itself.

19. What modifiers can be used with a local inner class?

A local inner class may be final or abstract.

20. Can an abstract class be final?

An abstract class may not be declared as final. Abstract and Final are two

keywords that carry totally opposite meanings and they cannot be used together.

21. What is the difference between a public and a non-public class?

A public class may be accessed outside of its package. A non-public class may not be accessed outside of its package.

22. What modifiers may be used with a top-level class?

A top-level class may be public, abstract, or final.

23. What are the Object and Class classes used for?

The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.

(6)

24. Can you make an instance of abstract class

No you cannot create an instance of abstract class. If you use new keyword to instantiate an abstract class, you will get a compilation error.

25. Describe what happens when an object is created in Java

Several things happen in a particular order to ensure the object is created properly:

1. Memory is allocated from heap to hold all instance variables and implementation-specific data of the

object and its superclasses. Implemenation-specific data includes pointers to class and method data.

2. The instance variables of the objects are initialized to their default values. 3. The constructor for the most derived class is invoked. The first thing a constructor does is call the

consctructor for its superclasses. This process continues until the constrcutor for java.lang.Object is called,

as java.lang.Object is the base class for all objects in java.

4. Before the body of the constructor is executed, all instance variable initializers and initialization blocks are executed. Then the body of the constructor is

executed. Thus, the constructor for the base class completes first and constructor for the most derived class completes last.

26. What is the purpose of System Class

The purpose of the system class is to provide the access to the System reources

27. What is instanceOf operator used for

It is used to check if an object can be cast into a specific type without throwing Class cast exception

(7)

28. Why we should not have instance variable in an interface?

Since all data fields and methods in an Interface are public by default, when we implement that interface in our class, we have public members in our class and this class will expose these data members and this is violation of encapsulation as now the data is not secure

29. What is a singleton class

A singleton is an object that cannot be instantiated more than once. The

restriction on the singleton is that there can be only one instance of a singleton created by the Java Virtual Machine (JVM) - by prevent direct instantiation we can ensure that developers don't create a second copy. We accomplish this by declaring the constructor private and having a public static instance variable of the class's type that can be accessed using a getInstance() method in the class.

30. Can an abstract class have final method

Yes, you can have a final method in an Abstract class.

31. Can a final class have an abstract method

No, a Final class cannot have an Abstract method.

32. When does the compiler insist that the class must be abstract

The compiler insists that your class be made abstract under the following circumstances:

1. If one or more methods of the class are abstract.

2. If class inherits one or more abstract methods from the parent abstract class and no implementation is provided for that method

3. If class implements an interface and provides no implementation for some methods

33. How is abstract class different from final class

Abstract class must be subclassed and an implementation has to be provided by the child class whereas final class cannot be subclassed

(8)

An inner class is same as any other class, just that, is declared inside some other class

35. How will you reference the inner class

To reference an inner class you will have to use the following syntax: OuterClass$InnerClass

36. Can objects that are instances of inner class access the members of the outer class

Yes they can access the members of the outer class

37. Can inner classes be static

Yes inner classes can be static, but they cannot access the non static data of the outer classes, though they can access the static data.

38. Can an inner class be defined inside a method

Yes it can be defined inside a method and it can access data of the enclosing methods or a formal parameter if it is final

39. What is an anonymous class

Some classes defined inside a method do not need a name, such classes are called anonymous classes.

40. What are access modifiers

These public, protected and private, these can be applied to class, variables, constructors and methods. But if you don't specify an access modifier then it is considered as Friendly. They determine the accessibility or visibility of the entities to which they are applied.

41. Can protected or friendly features be accessed from different packages

No when features are friendly or protected they can be accessed from all the classes in that package but not from classes in another package.

(9)

You can access protected features from other classes by subclassing the that class in another package, but this cannot be done for friendly features.

---

---JDBC Interview Questions

1- What is JDBC?

Java JDBC is a java API to connect and execute query with the database. JDBC API uses jdbc drivers to connect with the database.

Why use JDBC- Before JDBC, ODBC API was the database API to connect and execute query with the database. But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language).

2- What is JDBC Driver?

JDBC Driver is a software component that enables java application to interact with the database.There are 4 types of JDBC drivers:

(10)

Native-API driver (partially java driver) Network Protocol driver (fully java driver) Thin driver (fully java driver)

1) JDBC-ODBC bridge driver

The JDBC-ODBC bridge driver uses ODBC driver to connect to the database. The JDBC-ODBC bridge driver converts JDBC method calls into the ODBC function calls. This is now discouraged because of thin driver.

Advantages: easy to use.

can be easily connected to any database. Disadvantages:

Performance degraded because JDBC method call is converted into the ODBC function calls.

The ODBC driver needs to be installed on the client machine. 2) Native-API driver

The Native API driver uses the client-side libraries of the database. The driver converts JDBC method calls into native calls of the database API. It is not written entirely in java.

(11)

Advantage:

performance upgraded than JDBC-ODBC bridge driver. Disadvantage:

The Native driver needs to be installed on the each client machine. The Vendor client library needs to be installed on client machine. 3) Network Protocol driver

The Network Protocol driver uses middleware (application server) that converts JDBC calls directly or indirectly into the vendor-specific database protocol. It is fully written in java.

Advantage:

No client side library is required because of application server that can perform many tasks like auditing, load balancing, logging etc.

(12)

Disadvantages:

Network support is required on client machine.

Requires database-specific coding to be done in the middle tier.

Maintenance of Network Protocol driver becomes costly because it requires database-specific coding to be done in the middle tier.

4) Thin driver

The thin driver converts JDBC calls directly into the vendor-specific database protocol. That is why it is known as thin driver. It is fully written in Java language.

Advantage:

Better performance than all other drivers.

No software is required at client side or server side. Disadvantage:

Drivers depends on the Database.

3- What are the steps to connect to the database in java?

There are 5 steps to connect any java application with the database in java using JDBC. They are as follows:

Register the driver class Creating connection Creating statement

(13)

Executing queries Closing connection

4- What are the JDBC API components?

The java.sql package contains interfaces and classes for JDBC API. Interfaces: Connection Statement PreparedStatement ResultSet ResultSetMetaData DatabaseMetaData CallableStatement etc. Classes: DriverManager Blob Clob Types SQLException etc.

5- What are the JDBC statements?

There are 3 JDBC statements. Statement

PreparedStatement CallableStatement

6- What is the difference between Statement and PreparedStatement interface?

In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once. So performance of PreparedStatement is better than Statement.

(14)

By using Callable statement interface, we can execute procedures and functions.

8- What is the role of JDBC DriverManager class?

The DriverManager class manages the registered drivers. It can be used to register and unregister drivers. It provides factory method that returns the instance of Connection.

9- What does the JDBC Connection interface?

The Connection interface maintains a session with the database. It can be used for transaction management. It provides factory methods that returns the

instance of Statement, PreparedStatement, CallableStatement and DatabaseMetaData.

10- What does the JDBC ResultSet interface?

The ResultSet object represents a row of a table. It can be used to change the cursor pointer and get the information from the database.

11- What does the JDBC ResultSetMetaData interface?

The ResultSetMetaData interface returns the information of table such as total number of columns, column name, column type etc.

12- What does the JDBC DatabaseMetaData interface?

The DatabaseMetaData interface returns the information of the database such as username, driver name, driver version, number of tables, number of views etc.

13- Which interface is responsible for transaction management in JDBC?

The Connection interface provides methods for transaction management such as commit(), rollback() etc.

14- What is batch processing and how to perform batch processing in JDBC?

By using batch processing technique in JDBC, we can execute multiple queries. It makes the performance fast.

(15)

15- How can we store and retrieve images from the database?

By using PreparedStatement interface, we can store and retrieve images.

---

---Servlet interview Questions - 1

1- How many objects of a servlet is created?

Only one object at the time of first request by servlet or web container.

2- What is the life-cycle of a servlet?

The web container maintains the life cycle of a servlet instance. Let's see the life cycle of the servlet:

Servlet class is loaded. Servlet instance is created. init method is invoked. service method is invoked. destroy method is invoked.

(16)

As displayed in the above diagram, there are three states of a servlet: new, ready and end. The servlet is in new state if servlet instance is created. After invoking the init() method, Servlet comes in the ready state. In the ready state, servlet performs all the tasks. When the web container invokes the destroy() method, it shifts to the end state.

1) Servlet class is loaded

The classloader is responsible to load the servlet class. The servlet class is loaded when the first request for the servlet is received by the web container. 2) Servlet instance is created

The web container creates the instance of a servlet after loading the servlet class. The servlet instance is created only once in the servlet life cycle. 3) init method is invoked

The web container calls the init method only once after creating the servlet instance. The init method is used to initialize the servlet. It is the life cycle method of the javax.servlet.Servlet interface. Syntax of the init method is given below:

(17)

public void init(ServletConfig config) throws ServletException 4) service method is invoked

The web container calls the service method each time when request for the servlet is received. If servlet is not initialized, it follows the first three steps as described above then calls the service method. If servlet is initialized, it calls the service method. Notice that servlet is initialized only once. The syntax of the service method of the Servlet interface is given below

public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException

5) destroy method is invoked

The web container calls the destroy method before removing the servlet instance from the service. It gives the servlet an opportunity to clean up any resource for example memory, thread etc. The syntax of the destroy method of the Servlet interface is given below:

public void destroy()

3- What are the life-cycle methods for a servlet?

public void init(ServletConfig config)

It is invoked only once when first request comes for the servlet. It is used to initialize the servlet.

public void service(ServletRequest request,ServletResponse)throws ServletException,IOException

It is invoked at each request.The service() method is used to service the request.

public void destroy()

(18)

4- Who is responsible to create the object of servlet?

The web container or servlet container.

5- When servlet object is created?

At the time of first request.

6- What is difference between Get and Post method?

Get -

1) Limited amount of data can be sent because data is sent in header. 2) Not Secured because data is exposed in URL bar.

3) Can be bookmarked 4) Idempotent

5) It is more efficient and used than Post Post

1) Large amount of data can be sent because data is sent in body. 2) Secured because data is not exposed in URL bar.

3) Cannot be bookmarked 4) Non-Idempotent

5) It is less efficient and used

7- What is difference between PrintWriter and ServletOutputStream?

PrintWriter is a character-stream class where as ServletOutputStream is a byte-stream class. The PrintWriter class can be used to write only character-based information whereas ServletOutputStream class can be used to write primitive values as well as character-based information.

8- What is difference between GenericServlet and HttpServlet?

The GenericServlet is protocol independent whereas HttpServlet is HTTP protocol specific. HttpServlet provides additional functionalities such as state management etc.

9- What is servlet collaboration?

When one servlet communicates to another servlet, it is known as servlet collaboration. There are many ways of servlet collaboration:

(19)

RequestDispacher interface sendRedirect() method etc.

10- What is the purpose of RequestDispatcher Interface?

The RequestDispacher interface provides the facility of dispatching the request to another resource it may be html, servlet or jsp. This interceptor can also be used to include the content of antoher resource.

11- Can you call a jsp from the servlet?

Yes, one of the way is RequestDispatcher interface for example: RequestDispatcher rd=request.getRequestDispatcher("/login.jsp"); rd.forward(request,response);

12- Difference between forward() method and sendRedirect() method ?

forward() method

1) forward() sends the same request to another resource.2) forward() method works at server side.

3) forward() method works within the server only. sendRedirect() method

1) sendRedirect() method sends new request always because it uses the URL bar of the browser.

2) sendRedirect() method works at client side

3) sendRedirect() method works within and outside the server.

13- What is difference between ServletConfig and ServletContext?

The container creates object of ServletConfig for each servlet whereas object of ServletContext is created for each web application.

14- What is Session Tracking?

Session simply means a particular interval of time.

Session Tracking is a way to maintain state of an user.Http protocol is a stateless protocol.Each time user requests to the server, server treats the request as the new request.So we need to maintain the state of an user to recognize to particular user.

(20)

HTTP is stateless that means each request is considered as the new request. It is shown in the figure given below:

Why use Session Tracking?

To recognize the user It is used to recognize the particular user. Session Tracking Techniques

There are four techniques used in Session tracking: Cookies

Hidden Form Field URL Rewriting HttpSession

15- What are Cookies?

There are 2 types of cookies in servlets. Non-persistent cookie

Persistent cookie Non-persistent cookie

It is valid for single session only. It is removed each time when user closes the browser.

Persistent cookie

It is valid for multiple session . It is not removed each time when user closes the browser. It is removed only if user logout or signout.

(21)

Advantage of Cookies

Simplest technique of maintaining the state. Cookies are maintained at client side.

Disadvantage of Cookies

It will not work if cookie is disabled from the browser. Only textual information can be set in Cookie object.

16- What is difference between Cookies and HttpSession?

Cookie works at client side whereas HttpSession works at server side.

17- What is filter?

A filter is an object that is invoked at the preprocessing and postprocessing of a request.

It is mainly used to perform filtering tasks such as conversion, logging, compression, encryption and decryption, input validation etc.

18- How can we perform any action at the time of deploying the project?

By the help of ServletContextListener interface.

19- What is the disadvantage of cookies?

It will not work if cookie is disabled from the browser.

20- How can we upload the file to the server using servlet?

One of the way is by MultipartRequest class provided by third party.

21- What is load-on-startup in servlet?

The load-on-startup element of servlet in web.xml is used to load the servlet at the time of deploying the project or server start. So it saves time for the

response of first request.

22- What if we pass negative value in load-on-startup?

It will not affect the container, now servlet will be loaded at first request.

23- What is war file?

(22)

be converted into a war file. Moving one servlet project from one place to another will be fast as it is combined into a single file.

24- How to create war file?

The war file can be created using jar tool found in jdk/bin directory. If you are using Eclipse or Netbeans IDE, you can export your project as a war file. To create war file from console, you can write following code.

jar -cvf abc.war *

25- What are the annotations used in Servlet 3?

There are mainly 3 annotations used for the servlet. @WebServlet : for servlet class.

@WebListener : for listener class. @WebFilter : for filter class.

26- Which event is fired at the time of project deployment and undeployment?

ServletContextEvent.

27- Which event is fired at the time of session creation and destroy?

HttpSessionEvent.

28- Which event is fired at the time of setting, getting or removing attribute from application scope?

ServletContextAttributeEvent.

29- What is the use of welcome-file-list?

It is used to specify the welcome file for the project.

30- What is the use of attribute in servlets?

Attribute is a map object that can be used to set, get or remove in request, session or application scope. It is mainly used to share information between one servlet to another.

(23)

---

---Servlet interview Questions - 2

1- What is a Servlet?

Java Servlets is a Server side technology(basically specification) that allow the programmer to develop dynamic web resource program or server side web resource program in Java based web application.

Servlet is the software specification given by sun microsystem that provide set of rule and guideline for vendor company to develop software called servlet

container.

Servlet is single instance multiple threads based java component in Java web application to generate dynamic web application.

2- What are the types of Servlet?

There are two types of servlets, GenericServlet and HttpServlet. GenericServlet defines the generic or protocol independent servlet. HttpServlet is subclass of

(24)

GenericServlet and provides http protocl specific functionality.

3- What are the differences between a Servlet and an Applet?

1) Servlets are server side components that executes on the server whereas applets are client side components and executes on the web browser.

2)Applets have GUI interface but there is no GUI interface in case of Servlets. 3)Applets have limited capabilities whereas Servlets are very poweful and can support a wide variety of operations

4)Servlets can perform operations like interacting with other servlets, JSP Pages, connect to databases etc while Applets cannot do all this.

4- What are the different methods present in a HttpServlet?

The methods of HttpServlet class are :

doGet() - To handle the GET, conditional GET, and HEAD requests doPost() - To handle POST requests

doPut() - To handle PUT requests

doDelete() - To handle DELETE requests

doOptions() - To handle the OPTIONS requests and doTrace() - To handle the TRACE requests

Apart from these, a Servlet also contains init() and destroy() methods that are used to initialize and destroy the servlet respectively. They are not any operation specific and are available in all Servlets for use during their active life-cycle.

(25)

5- What are the advantages of Servlets over CGI programs?

Java Servlets have a number of advantages over CGI and other API's. Some are:

1. Platform Independence - Java Servlets are 100% pure Java, so it is platform independent. It can run on any Servlet enabled web server. For example if you develop an web application in windows machine running Java web server. You can easily run the same on apache web server without modification code.

Platform independency of servlets provide a great advantages over alternatives of servlets.

2. Performance - Anyone who has used CGI would agree that Servlets are much more powerful and quicker than CGI. Because the underlying technology is Java, it is fast and can handle multiple request simultaneously. Also, a servlet gets initialized only once in its lifetime and then continues to serve requests without having to be re-initialized again, hence the performance is much higher than CGIs.

3. Extensibility - Java Servlets are developed in java which is robust,

well-designed and object oriented language which can be extended or polymorphed into new objects. So the java servlets takes all these advantages and can be extended from existing class the provide the ideal solutions.

Also, in terms of Safety & Security Servlets are superior when compared to CGI.

6- What are the type of protocols supported by HttpServlet?

It extends the GenericServlet base class and provides an framework for handling the HTTP protocol. So, HttpServlet only supports HTTP and HTTPS protocol.

7- What is ServletContext?

(26)

to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. There is one context per "web

application" per Java Virtual Machine.

8- What is meant by Pre-initialization of Servlet?

When servlet container is loaded, all the servlets defined in the web.xml file do not get initialized by default. When the container receives a request to hit a particular servlet, it loads that servlet. But in some cases if you want your servlet to be initialized when context is loaded, you have to use a concept called pre-initialization of Servlet. In this case, the servlet is loaded when context is loaded. You can specify 1 in between the tag in the Web.xml file in order to pre-initialize your servlet.

Example.

<Load-on-startup>1</Load-on-startup>

9- What mechanisms are used by a Servlet Container to maintain session information?

Servlet Container uses Cookies, URL rewriting, and HTTPS protocol information to maintain the session.

10- What do you understand by servlet mapping?

Servlet mapping defines an association between a URL pattern and a servlet. You can use one servlet to process a number of url patterns. For example in case of Struts *.do url patterns are processed by Struts Controller Servlet.

(27)

11- What interface must be implemented by all Servlets?

The Servlet Interface must be implemented by all servlets (either the GenericServlet or the HttpServlet)

12- What are the uses of Servlets?

1) Servlets are used to process the client requests.

2) A Servlet can handle multiple request concurrently and be used to develop high performance system

3) A Servlet can be used to load balance among serveral servers, as Servlet can easily forward request.

13- What are the objects that are received when a servlets accepts call from client?

The objects are: ServeltRequest and ServletResponse

The ServeltRequest encapsulates the communication from the client to the server. While ServletResponse encapsulates the communication from the Servlet back to the client. All the passage of data between the client and server happens by means of these request and response objects.

---Session Based Interview Questions

1. What is a Session?

A Session refers to all the request that a single client makes to a server. A session is specific to the user and for each user a new session is created to track all the requests from that particular user. Sessions are not shared among

(28)

users and each user of the system will have a seperate session and a unique session Id. In most cases, the default value of time-out* is 20 minutes and it can be changed as per the website requirements.

*Time-Out - The Amount of time after which a session becomes invalidated/destroyed if the session has been inactive.

2. What is Session ID?

A session ID is an unique identification string usually a long, random and alpha-numeric string, that is transmitted between the client and the server. Session IDs are usually stored in the cookies, URLs (in case url rewriting) and hidden fields of Web pages.

3. What is Session Tracking?

HTTP is stateless protocol and it does not maintain the client state. But there exist a mechanism called "Session Tracking" which helps the servers to maintain the state to track the series of requests from the same user across some period of time.

4. What are different types of Session Tracking?

Mechanism for Session Tracking are: a) Cookies

b) URL rewriting c) Hidden form fields d) SSL Sessions

5. What is HTTPSession Class?

HttpSession Class provides a way to identify a user across across multiple request. The servlet container uses HttpSession interface to create a session between an HTTP client and an HTTP server. The session lives only for a specified time period, across more than one connection or page request from the user.

(29)

In HttpServlet you can use Session Tracking to track the user state. Simply put, it is used to store information like users login credentials, his choices in previous pages (like in a shopping cart website) etc

7. What are the advantage of Cookies over URL rewriting?

Sessions tracking using Cookies are more secure and fast. It keeps the website URL clean and concise instead of a long string appended to the URL everytime you click on any link in the website. Also, when we use url rewriting, it requites large data transfer from and to the server. So, it may lead to significant network traffic and access to the websites may be become slow.

8. What is session hijacking?

If you application is not very secure then it is possible to get the access of system after acquiring or generating the authentication information. Session hijacking refers to the act of taking control of a user session after successfully obtaining or generating an authentication session ID. It involves an attacker using captured, brute forced or reverse-engineered session IDs to get a control of a legitimate user's Web application session while that session is still in

progress.

9. What is Session Migration?

Session Migration is a mechanism of moving the session from one server to another in case of server failure. Session Migration can be implemented by: a) Persisting the session into database

b) Storing the session in-memory on multiple servers.

10. How to track a user session in Servlets?

The interface HttpSession can be used to track the session in the Servlet. Following code can be used to create session object in the Servlet:

HttpSession session = req.getSession(true);

Using this session object, the servlet can gain access to the details of the session.

(30)

11. How can you destroy the session in Servlet?

You can call invalidate() method on the session object to destroy the session. e.g. session.invalidate();

---

---JSP Based Interview Questions

1. What is JSP?

JavaServer Pages (JSP) technology is the Java platform technology for delivering dynamic content to web applications in a portable, secure and well-defined way. The JSP Technology allows us to use HTML, Java, JavaScript and XML in a single file to create high quality and fully functionaly User Interface components for Web Applications.

2. What do you understand by JSP Actions?

JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters.

There are six JSP Actions: < jsp : include / >

< jsp : forward / > < jsp : plugin / > < jsp : usebean / > < jsp : setProperty / >

(31)

< jsp : getProperty / >

3. What is the difference between < jsp : include page = ... > and < % @ include file = ... >?

Both the tags include information from one JSP page in another. The differences are:

< jsp : include page = ... >

This is like a function call from one jsp to another jsp. It is executed ( the included page is executed and the generated html content is included in the content of calling jsp) each time the client page is accessed by the client. This approach is useful while modularizing a web application. If the included file changes then the new content will be included in the output automatically. < % @ include file = ... >

In this case the content of the included file is textually embedded in the page that have < % @ include file=".."> directive. In this case when the included file changes, the changed content will not get included automatically in the output. This approach is used when the code from one jsp file required to include in multiple jsp files.

4. What is the difference between < jsp : forward page = ... > and response.sendRedirect(url)?

The element forwards the request object containing the client request

information from one JSP file to another file. The target file can be an HTML file, another JSP file, or a servlet, as long as it is in the same application context as the forwarding JSP file.

sendRedirect sends HTTP temporary redirect response to the browser, and browser creates a new request to go the redirected page. The

(32)

5. Name one advantage of JSP over Servlets?

Can contain HTML, JavaScript, XML and Java Code whereas Servlets can contain only Java Code, making JSPs more flexible and powerful than Servlets. However, Servlets have their own place in a J2EE application and cannot be ignored altogether. They have their strengths too which cannot be overseen.

6. What are implicit Objects available to the JSP Page?

Implicit objects are the objects available to the JSP page. These objects are created by Web container and contain information related to a particular request, page, or application. The JSP implicit objects are:

application config exception out page pageContext request response and session

7. What are all the different scope values for the < jsp : useBean > tag?

< jsp : useBean > tag is used to use any java object in the jsp page. Here are the scope values for < jsp : useBean > tag:

a) page b) request c) session and d) application

8. What is JSP Output Comments?

(33)

source file. They are comments that are enclosed within the < ! - - Your Comments Here - - >

9. What is expression in JSP?

Expression tag is used to insert Java values directly into the output. Syntax for the Expression tag is: < %= expression % >

An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. The most commonly used language is regular Java.

10. What types of comments are available in the JSP?

There are two types of comments that are allowed in the JSP. They are hidden and output comments.

A hidden comment does not appear in the generated HTML output, while output comments appear in the generated output.

Example of hidden comment:

< % - - This is a hidden comment - - % > Example of output comment:

< ! - - This is an output comment - - >

11. What is a JSP Scriptlet?

JSP Scriptlets is a term used to refer to pieces of Java code that can be

embedded in a JSP PAge. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked.

12. What are the life-cycle methods of JSP?

(34)

a) jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. b)_jspService(): The container calls the _jspservice() for each request and it passes the request and the response objects. _jspService() method cann't be overridden.

c) jspDestroy(): The container calls this when its instance is about to destroyed. The jspInit() and jspDestroy() methods can be overridden within a JSP page.

13. What are JSP Custom tags?

JSP Custom tags are user defined JSP language elements. JSP custom tags are user defined tags that can encapsulate common functionality. For example you can write your own tag to access the database and performing database operations. You can also write custom tags to encapsulate both simple and complex behaviors in an easy to use syntax. The use of custom tags greatly enhances the functionality and simplifies the readability of JSP pages.

14. What is the role of JSP in MVC Model?

JSP is mostly used to develop the user interface, It plays are role of View in the MVC Model.

15. What do you understand by context initialization parameters?

The context-param element contains the declaration of a web application's servlet context initialization parameters.

< context - param >

< param name > name < / param name > < param value > value < / param -value >

< / context-param >

The Context Parameters page lets you manage parameters that are accessed through the ServletContext.getInitParameterNames and

(35)

16. Can you extend JSP technology?

Yes. JSP technology lets the programmer to extend the jsp to make the programming more easier. JSP can be extended and custom actions & tag libraries can be developed to enhance/extend its features.

17. What do you understand by JSP translation?

JSP translation is an action that refers to the convertion of the JSP Page into a Java Servlet. This class is essentially a servlet class wrapped with features for JSP functionality.

18. How can you prevent the Browser from Caching data of the Pages you visit?

By setting properties that prevent caching in your JSP Page. They are: <% response.setHeader("pragma","no-cache");//HTTP 1.1

Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", -1);

response.setDateHeader("max-age", 0); //response.setIntHeader ("Expires", -1); //prevents caching at the proxy server response.addHeader("cache-Control", "private"); %>

19. How will you handle the runtime exception in your jsp page?

The errorPage attribute of the page directive can be used to catch run-time exceptions automatically and then forwarded to an error processing page. You can define the error page to which you want the request forwarded to, in case of an exception, in each JSP Page. Also, there should be another JSP that plays the role of the error page which has the flag isErrorPage set to True.

20. 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.

(36)

21. What is JSP container ?

A container that provides the same services as a servlet container and an engine that interprets and processes JSP pages into a servlet.

22. What is JSP custom action ?

A user-defined action described in a portable manner by a tag library descriptor and imported into a JSP page by a taglib directive. Custom actions are used to encapsulate recurring tasks in writing JSP pages.

23. What is JSP custom tag ?

A tag that references a JSP custom action.

24. What is JSP declaration ?

A JSP scripting element that declares methods, variables, or both in a JSP page.

25. What is JSP directive ?

A JSP element that gives an instruction to the JSP container and is interpreted at translation time.

26. What is JSP document ?

A JSP page written in XML syntax and subject to the constraints of XML documents.

27. What is JSP element ?

A portion of a JSP page that is recognized by a JSP translator. An element can be a directive, an action, or a scripting element.

28. What is JSP expression ?

A scripting element that contains a valid scripting language expression that is evaluated, converted to a String, and placed into the implicit out object.

(37)

A language used to write expressions that access the properties of JavaBeans components. EL expressions can be used in static text and in any standard or custom tag attribute that can accept an expression.

30. What is JSP page ?

A text-based document containing static text and JSP elements that describes how to process a request to create a response. A JSP page is translated into and handles requests as a servlet.

31. What is JSP scripting element ?

A JSP declaration, scriptlet, or expression whose syntax is defined by the JSP specification and whose content is written according to the scripting language used in the JSP page. The JSP specification describes the syntax and

semantics for the case where the language page attribute is "java".

32. What is JSP scriptlet ?

A JSP scripting element containing any code fragment that is valid in the

scripting language used in the JSP page. The JSP specification describes what is a valid scriptlet for the case where the language page attribute is "java".

33. What is JSP tag file ?

A source file containing a reusable fragment of JSP code that is translated into a tag handler when a JSP page is translated into a servlet.

34. What is JSP tag handler ?

A Java programming language object that implements the behavior of a custom tag.

If you have any questions that you want answer for - please leave a comment on this page and I will answer them.

(38)

---Struts interview questions (Part-1)

1.What is MVC?

Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data.

Model: The model contains the core of the application's functionality. The model encapsulates the state of the application.

Sometimes the only functionality it contains is state. It knows nothing about the view or controller.

View: The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows nothing about the controller. The view should be notified when changes to the model occur.

Controller: The controller reacts to the user input. It creates and sets the model.

2.What is a framework?

A framework is made up of the set of classes which allow us to use a library in a best possible way for a specific requirement.

3.What is Struts framework?

Struts framework is an open-source framework for developing the web

applications in JavaEE, based on MVC-2 architecture. It uses and extends the Java Servlet API. Struts is robust architecture and can be used for the

development of application of any size. Struts framework makes it much easier to design scalable, reliable Web applications with Java.

4.What are the components of Struts?

(39)

Model: Components like business logic /business processes and data are the part of model.

View: HTML, JSP are the view components.

Controller: Action Servlet of Struts is part of Controller components which works as front controller to handle all the requests.

5.What are the core classes of the Struts Framework?

Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design. JavaBeans components for managing application state and behavior.

Event-driven development (via listeners as in traditional GUI development). Pages that represent MVC-style views; pages reference view roots via the JSF component tree.

6.What is ActionServlet?

ActionServlet is a simple servlet which is the backbone of all Struts applications. It is the main Controller component that handles client requests and determines which Action will process each received request. It serves as an Action factory – creating specific Action classes based on user’s request.

7.What is role of ActionServlet?

ActionServlet performs the role of Controller: · Process user requests

· Determine what the user is trying to achieve according to the request · Pull data from the model (if necessary) to be given to the appropriate view, · Select the proper view to respond to the user

· Delegates most of this grunt work to Action classes · Is responsible for initialization and clean-up of resources

8.What is the ActionForm?

ActionForm is javabean which represents the form inputs containing the request parameters from the View referencing the Action bean.

(40)

9.What are the important methods of ActionForm?

The important methods of ActionForm are : validate() & reset().

10.Describe validate() and reset() methods ?

validate() : Used to validate properties after they have been populated; Called before FormBean is handed to Action. Returns a collection of ActionError as ActionErrors. Following is the method signature for the validate() method. public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) reset(): reset() method is called by Struts Framework with each request that uses the defined ActionForm. The purpose of this method is to reset all of the ActionForm's data members prior to the new request values being set.

public void reset() {}

11.What is ActionMapping?

Action mapping contains all the deployment information for a particular Action bean. This class is to determine where the results of the Action will be sent once its processing is complete.

12.How is the Action Mapping specified ?

We can specify the action mapping in the configuration file called struts-config.xml. Struts framework creates ActionMappingobject

from <ActionMapping> configuration element of struts-config.xml file <action-mappings> <action path="/submit" type="submit.SubmitAction" name="submitForm" input="/submit.jsp" scope="request" validate="true">

<forward name="success" path="/success.jsp"/> <forward name="failure" path="/error.jsp"/> </action>

(41)

13.What is role of Action Class?

An Action Class performs a role of an adapter between the contents of an incoming HTTP request and the corresponding business logic

that should be executed to process this request.

14.In which method of Action class the business logic is executed ?

In the execute() method of Action class the business logic is executed. public ActionForward execute(

ActionMapping mapping, ActionForm form,

HttpServletRequest request, HttpServletResponse response) throws Exception ;

execute() method of Action class:

· Perform the processing required to deal with this request

· Update the server-side objects (Scope variables) that will be used to create the next page of the user interface

· Return an appropriate ActionForward object

15.What design patterns are used in Struts?

Struts is based on model 2 MVC (Model-View-Controller) architecture. Struts controller uses the command design pattern and the action classes use the adapter design pattern. The process() method of the RequestProcessor uses the template method design pattern.

Struts also implement the following J2EE design patterns. · Service to Worker

· Dispatcher View

· Composite View (Struts Tiles) · Front Controller

(42)

· View Helper

· Synchronizer Token

16.Can we have more than one struts config.xml file for a single Struts application?

Yes, we can have more than one struts-config.xml for a single Struts application. They can be configured as follows:

<servlet> <servlet-name>action</servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config</param-name> <param-value> /WEB-INF/struts-config.xml, /WEB-INF/struts-admin.xml, /WEB-INF/struts-config-forms.xml </param-value> </init-param> ... <servlet>

17.What is the directory structure of Struts application?

(43)

18.What is the difference between session scope and request scope when saving formbean ?

when the scope is request,the values of formbean would be available for the current request.

when the scope is session,the values of formbean would be available throughout the session.

19.What are the important tags of struts-config.xml ?

(44)

20.What are the different kinds of actions in Struts?

The different kinds of actions in Struts are: · ForwardAction · IncludeAction · DispatchAction · LookupDispatchAction · SwitchAction ---

(45)

21.What is DispatchAction?

The DispatchAction class is used to group related actions into one class. Using this class, you can have a method for each logical action compared than a single execute method. The DispatchAction dispatches to one of the logical actions represented by the methods. It picks a method to invoke based on an incoming request parameter. The value of the incoming parameter is the name of the method that the DispatchAction will invoke.

22.How to use DispatchAction?

To use the DispatchAction, follow these steps

· Create a class that extends DispatchAction (instead of Action)

· In a new class, add a method for every function you need to perform on the service – The method has the same signature as the execute() method of an Action class.

· Do not override execute() method – Because DispatchAction class itself provides execute() method.

· Add an entry to struts-config.xml DispatchAction Example »

23.What is the use of ForwardAction?

The ForwardAction class is useful when you’re trying to integrate Struts into an existing application that uses Servlets to perform

business logic functions. You can use this class to take advantage of the Struts controller and its functionality, without having to rewrite the existing Servlets. Use ForwardAction to forward a request to another resource in your application, such as a Servlet that already does business logic processing or even another JSP page. By using this predefined action, you don’t have to write your own Action class. You just have to set up the struts-config file properly to use ForwardAction.

24.What is IncludeAction?

The IncludeAction class is useful when you want to integrate Struts into an application that uses Servlets. Use the IncludeAction class to include another resource in the response to the request being processed.

(46)

25.What is the difference between ForwardAction and IncludeAction?

The difference is that you need to use the IncludeAction only if the action is going to be included by another action or jsp.

UseForwardAction to forward a request to another resource in your application, such as a Servlet that already does business logic

processing or even another JSP page.

26.What is LookupDispatchAction?

The LookupDispatchAction is a subclass of DispatchAction. It does a reverse lookup on the resource bundle to get the key and then

gets the method whose name is associated with the key into the Resource Bundle.

27.What is the use of LookupDispatchAction?

LookupDispatchAction is useful if the method name in the Action is not driven by its name in the front end, but by the Locale independent key into the resource bundle. Since the key is always the same, the LookupDispatchAction shields your application from the side effects of I18N.

28.What is difference between LookupDispatchAction and DispatchAction?

The difference between LookupDispatchAction and DispatchAction is that the actual method that gets called in LookupDispatchAction is

based on a lookup of a key value instead of specifying the method name directly.

29.What is SwitchAction?

The SwitchAction class provides a means to switch from a resource in one module to another resource in a different module. SwitchAction is useful only if you have multiple modules in your Struts application. The SwitchAction class can be used as is, without extending.

30.What if <action> element has <forward> declaration with same name as global forward?

(47)

<forward>takes precendence.

31.What is DynaActionForm?

A specialized subclass of ActionForm that allows the creation of form beans with dynamic sets of properties (configured in configuration file), without requiring the developer to create a Java class for each type of form bean.

32.What are the steps need to use DynaActionForm?

Using a DynaActionForm instead of a custom subclass of ActionForm is relatively straightforward. You need to make changes in two places: · In struts-config.xml: change your <form-bean> to be an

org.apache.struts.action.DynaActionForm instead of some subclass of ActionForm

33.How to display validation errors on jsp page?

<html:errors/> tag displays all the errors. <html:errors/> iterates over ActionErrors request attribute.

34.What are the various Struts tag libraries?

The various Struts tag libraries are: · HTML Tags · Bean Tags · Logic Tags · Template Tags · Nested Tags · Tiles Tags

35.What is the use of <logic:iterate>?

<logic:iterate> repeats the nested body content of this tag over a specified collection.

<table border=1>

<logic:iterate id="customer" name="customers"> <tr>

(48)

property="firstName"/></td>

<td><bean:write name="customer" property="lastName"/></td> <td><bean:write name="customer" property="address"/></td> </tr>

</logic:iterate> </table>

36.What are differences between <bean:message> and <bean:write>

<bean:message>: is used to retrive keyed values from resource bundle. It also supports the ability to include parameters that can be

substituted for defined placeholders in the retrieved string. <bean:message key="prompt.customer.firstname"/>

<bean:write>: is used to retrieve and print the value of the bean property. <bean:write> has no body.

<bean:write name="customer" property="firstName"/>

37.How the exceptions are handled in struts?

Exceptions in Struts are handled in two ways: · Programmatic exception handling :

Explicit try/catch blocks in any code that can throw exception. It works well when custom value (i.e., of variable) needed

when error occurs.

· Declarative exception handling :You can either define <global-exceptions> handling tags in your struts-config.xml or define the exception handling tags within <action></action> tag. It works well when custom page needed when error occurs. This approach applies only to exceptions thrown by Actions. <global-exceptions> <exception key="some.key" type="java.lang.NullPointerException" path="/WEB-INF/errors/null.jsp"/> </global-exceptions> or <exception key="some.key" type="package.SomeException"

(49)

path="/WEB-INF/somepage.jsp"/>

38.What is difference between ActionForm and DynaActionForm?

· An ActionForm represents an HTML form that the user interacts with over one or more pages. You will provide properties to hold the state of the form with getters and setters to access them. Whereas, using DynaActionForm there is no need of providing properties to hold the state. Instead these properties and their type are declared in the struts-config.xml

· The DynaActionForm bloats up the Struts config file with the xml based definition. This gets annoying as the Struts Config file

grow larger.

· The DynaActionForm is not strongly typed as the ActionForm. This means there is no compile time checking for the form fields. Detecting them at runtime is painful and makes you go through redeployment.

· ActionForm can be cleanly organized in packages as against the flat organization in the Struts Config file.

· ActionForm were designed to act as a Firewall between HTTP and the Action classes, i.e. isolate and encapsulate the HTTP request parameters from direct use in Actions. With DynaActionForm, the property access is no different than using request.getParameter.

· DynaActionForm construction at runtime requires a lot of Java Reflection (Introspection) machinery that can be avoided.

39.How can we make message resources definitions file available to the Struts framework environment?

We can make message resources definitions file (properties file) available to Struts framework environment by adding this file to strutsconfig.

xml.

<message-resources

parameter="com.login.struts.ApplicationResources"/>

40.What is the life cycle of ActionForm?

The lifecycle of ActionForm invoked by the RequestProcessor is as follows: · Retrieve or Create Form Bean associated with Action

(50)

· Reset the properties of the FormBean · Populate the properties of the FormBean · Validate the properties of the FormBean · Pass FormBean to Action

---

---Spring Based interview Questions

1. Explain DI or IOC pattern.

Dependency injection (DI) is a programming design pattern and

architectural model, sometimes also referred to as inversion of control or IOC, although technically speaking, dependency injection specifically refers to an implementation of a particular form of IOC. Dependency

Injection describes the situation where one object uses a second object to provide a particular capacity. For example, being passed a database

connection as an argument to the constructor method instead of creating one inside the constructor. The term "Dependency injection" is a

misnomer, since it is not a dependency that is injected; rather it is a provider of some capability or resource that is injected. There are three common forms of dependency injection: setter, constructor and interface-based injection.

Dependency injection is a way to achieve loose coupling. Inversion of control (IOC) relates to the way in which an object obtains references to its dependencies. This is often done by a lookup method. The advantage of inversion of control is that it decouples objects from specific lookup mechanisms and implementations of the objects it depends on. As a result, more flexibility is obtained for production applications as well as for testing.

(51)

2. What are the different IOC containers available?

Spring is an IOC container. Other IOC containers are HiveMind, Avalon, PicoContainer.

3. What are the different types of dependency injection? Explain with examples.

There are two types of dependency injection: setter injection and constructor injection.

Setter Injection: Normally in all the java beans, we will use setter and getter method to set and get the value of property as follows:

public class namebean { String name;

public void setName(String a) { name = a; }

public String getName() { return name; }

}

We will create an instance of the bean 'namebean' (say bean1) and set property as bean1.setName("tom"); Here in setter injection, we will set the property 'name' in spring configuration file as shown below:

< bean id="bean1" class="namebean" > < property name="name" >

< value > tom < / value > < / property >

< / bean >

The subelement < value > sets the 'name' property by calling the set method as setName("tom"); This process is called setter injection. To set properties that reference other beans , subelement of is used as shown below,

(52)

< bean id="bean1" class="bean1impl" > < property name="game" >

< ref bean="bean2" / > < / property >

< / bean >

< bean id="bean2" class="bean2impl" / >

Constructor injection: For constructor injection, we use constructor with parameters as shown below,

public class namebean { String name;

public namebean(String a) { name = a;

} }

We will set the property 'name' while creating an instance of the bean 'namebean' as namebean bean1 = new namebean("tom");

Here we use the < constructor-arg > element to set the property by constructor injection as

< bean id="bean1" class="namebean" > < constructor-arg >

< value > My Bean Value < / value > < / constructor-arg >

< / bean >

4. What is spring? What are the various parts of spring framework? What are the different persistence frameworks which could be used with spring?

Spring is an open source framework created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be

(53)

selective about which of its components you use while also providing a cohesive framework for J2EE application development. The Spring

modules are built on top of the core container, which defines how beans are created, configured, and managed. Each of the modules (or

components) that comprise the Spring framework can stand on its own or be implemented jointly with one or more of the others. The functionality of each component is as follows:

The core container: The core container provides the essential functionality of the Spring framework. A primary component of the core container is the BeanFactory, an implementation of the Factory pattern. The BeanFactory applies the Inversion of Control (IOC) pattern to separate an application’s configuration and dependency specification from the actual application code.

Spring context: The Spring context is a configuration file that provides context information to the Spring framework. The Spring context includes enterprise services such as JNDI, EJB, e-mail, internalization, validation, and scheduling functionality.

Spring AOP: The Spring AOP module integrates aspect-oriented

programming functionality directly into the Spring framework, through its configuration management feature. As a result you can easily AOP-enable any object managed by the Spring framework. The Spring AOP module provides transaction management services for objects in any Spring-based application. With Spring AOP you can incorporate declarative transaction management into your applications without relying on EJB components.

Spring DAO: The Spring JDBC DAO abstraction layer offers a meaningful exception hierarchy for managing the exception handling and error

messages thrown by different database vendors. The exception hierarchy simplifies error handling and greatly reduces the amount of exception code you need to write, such as opening and closing connections. Spring DAO’s JDBC-oriented exceptions comply to its generic DAO exception

References

Related documents

Abstract: According to the Repugnant Conclusion: Compared with the existence of many people who would all have some very high quality of life, there is some much larger number of

Called before using parameterized constructor in with example is not accept any instance constructor to initialize the application in every class contains a class can initialize

private : Private variables or methods may be used only by an instance of the same class that declares the variable or method, A private feature may only be accessed by the class

An advanced vba applications such as a single function, identifiers identifiying three basic code can be used in memory used locally, using a and declaring variable as a function

Downregulation of long noncoding RNA LINC01419 inhibits cell migration, invasion, and tumor growth and promotes autophagy via inactivation of the PI3K/Akt1/mTOR pathway in gastric

This java static attribute that declaring class that has a declaration of a variable declarations of a class are methods to declare a value to

Keyword extern is used to declaring a global variable or function in another file to sour the reference of variable or function which was been.. The site for readers of declaring

An instance variable declared as protected can be accessed by any non-static method of the class in which it is