Que: What is JDBC ?
Ans: JDBC stands for Java DataBase Connectivity is a Java API that is used to connect and execute query to the database.JDBC API uses JDBC drivers to connects to the database.
Que: What is JDBC Driver ?
Ans:JDBC Driver is a software component that enables java application to interact with the database.
There are 4 types of JDBC drivers:
1. JDBC-ODBC bridge driver
2. Native-API driver (partially java driver)
3. Network Protocol driver (fully java driver)
4. Thin driver (fully java driver)(mostly used driver)
Que: What are the steps to connect to the database in java ?
Ans: Register the driver class(JDBC driver)
Create connection
Create statement
Execute query
Close connection
Que: What is the difference between Statement and PreparedStatement interface ?
Ans: In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once and data is store in cache to use further. So performance of PreparedStatement is better than Statement.
Que: How can we execute stored procedures and functions ?
Ans: CallableStatement interface is used to execute procedures and funtions in java.
Que: How can we store and retrieve images from the database ?
Ans: PreparedStaement interface is used to store and retrieve images in java.
Que: What is a JavaBean ?
Ans: JavaBean is a reusable software components that is used in Java programming language, it provide the structure to reuse the java code in multiple places in project.
Que: What is Locale Class ?
Ans: A Locale Class contains methods and constructors to fetch specific geographical, political, or cultural region information.
Que: What are wrapper classes ?
Ans: Wrapper classes are classes that allow primitive data types to be accessed as objects.
For Example: Integer, Long, Double etc classes are Wrapper classes.
Que:What is the use of System class ?
Ans: System class is to used to access system resources.
Que: What is singleton class ?
Ans: Singleton class means that at any given time only one instance of the class is present, in one JVM.
Que: What is an applet ?
Ans: An applet is a small java program that runs inside in browser and generates dynamic contents.
Ans: JDBC stands for Java DataBase Connectivity is a Java API that is used to connect and execute query to the database.JDBC API uses JDBC drivers to connects to the database.
Que: What is JDBC Driver ?
Ans:JDBC Driver is a software component that enables java application to interact with the database.
There are 4 types of JDBC drivers:
1. JDBC-ODBC bridge driver
2. Native-API driver (partially java driver)
3. Network Protocol driver (fully java driver)
4. Thin driver (fully java driver)(mostly used driver)
Que: What are the steps to connect to the database in java ?
Ans: Register the driver class(JDBC driver)
Create connection
Create statement
Execute query
Close connection
Que: What is the difference between Statement and PreparedStatement interface ?
Ans: In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once and data is store in cache to use further. So performance of PreparedStatement is better than Statement.
Que: How can we execute stored procedures and functions ?
Ans: CallableStatement interface is used to execute procedures and funtions in java.
Que: How can we store and retrieve images from the database ?
Ans: PreparedStaement interface is used to store and retrieve images in java.
Que: What is a JavaBean ?
Ans: JavaBean is a reusable software components that is used in Java programming language, it provide the structure to reuse the java code in multiple places in project.
Que: What is Locale Class ?
Ans: A Locale Class contains methods and constructors to fetch specific geographical, political, or cultural region information.
Que: What are wrapper classes ?
Ans: Wrapper classes are classes that allow primitive data types to be accessed as objects.
For Example: Integer, Long, Double etc classes are Wrapper classes.
Que:What is the use of System class ?
Ans: System class is to used to access system resources.
Que: What is singleton class ?
Ans: Singleton class means that at any given time only one instance of the class is present, in one JVM.
Que: What is an applet ?
Ans: An applet is a small java program that runs inside in browser and generates dynamic contents.
No comments:
Post a Comment