J2EE Test - 01
J2EE Test - 01
Jar means Java Archive (Compressed). It is a file format based on zip file format which is used to
compress many files into one single file.
2. Contents of Jar File:
1) .java: contains source code statements in it.
2) .class: contains byte code statements in it.
3) ConfigFiles: contains only configuration data in it.
a) .xml: it is used to configure a resource with the help of custom tags/user defined tags.
b) .properties: It is used to provide a set of properties in the form of key and value pair
where the key must be unique.
b. Interface:
Interface is the media to communicate between user and any device.
c. Loose Coupling:
Change in the implementation which doesn’t affect the user is known as Loose Coupling.
d. Tight Coupling:
Change in the implementation which affect the user is known as Tight Coupling.
e. Factory/Helper Method:
It is used to create implementation object.
f. NullPointerException:
Pointing towards an object which is not present throws an exception called
NullPointerException.
g. Costly Resources:
The resources which make use of system properties in the form of stream are known as
costly resources.
h. Port Number:
Port number is the one which helps us to get connected to a particular server.
Port numbers are provided by the respective servers which must be unique but can be
changed.
Steps of JDBC:
a. Load and Register the Driver.
b. Establish a connection with the Database Server.
c. Create a Statement or a Platform.
d. Execute the SQL Queries or SQL Statements.
e. Process the resultant data.
f. Close all the Costly Resources.
Advantages:
• We can achieve Loose Coupling between java application and database server.
• JDBC is platform Independent.
8. Explain class Loading in brief?
It is the process of Loading the .class file from the hardisk memory to JVM memory is
known as class loading.