MongoDB is a no-SQL database that is document-oriented. MongoDB, which was first released in 2009, successfully replaced rows and columns in traditional relational data models with documents. We do not need to use the JDBC API to connect to MongoDB because its API is completely independent and does not require any other external library. Prerequisites: […]
September 5, 2022 | Java | No comments
Follow the steps below to connect a Java application to an Oracle database using Thin Driver. Download Oracle JDBC Driver Load Driver Class JDBC Connection Load the jar file Download Oracle JDBC Driver: Visit Oracle database website and download the Oracle JDBC Driver. Load Driver Class: The Oracle database Driver Class is oracle.jdbc.driver.OracleDriver and the Class.forName(“oracle.jdbc.driver.OracleDriver”) method […]
September 5, 2022 | Java | No comments
Follow the steps below to connect a Java application to a MySQL database using the JDBC Driver. Download JDBC driver for MySQL No need to load MySQL driver class explicitly Understand the getConnection() method of DriverManager class Java code example connects to MySQL database Download JDBC driver for MySQL: To begin, a JDBC driver for […]
September 4, 2022 | Java | No comments
To connect any Java application to a database using JDBC, follow these five steps. These are the steps to take: Register the Driver class Create connection Create statement Execute queries Close connection Register the driver class: The Class class’s forName() method is used to register the driver class. This method is used to load the […]
September 2, 2022 | Java | No comments
The Java Database Connectivity (JDBC) API allows Java programmers to access data from any database. You can use the JDBC API to access almost any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common foundation for the development of tools and alternate interfaces. Packages of JDBC API: The […]
September 2, 2022 | Java | No comments
JDBC (Java Database Connectivity) is the Java API for connecting to a database, issuing queries and commands, and handling database result sets. It is a component of JavaSE (Java Standard Edition). JDBC API connects to the database using JDBC drivers. JDBC is fundamentally a specification that provides a comprehensive set of interfaces for mobile access […]
September 1, 2022 | Java | No comments
Remote Method Invocation (RMI) is an API that allows an object to call a method on another object in another address space, which could be on the same machine or another machine. RMI enables remote communication between Java programs and is used to create distributed applications. It is provided in the package java.rmi. RMI Application Architecture: […]
August 31, 2022 | Java | No comments
Java includes a class called Class in the java.lang package. In a running Java application, instances of the class Class represent classes and interfaces. Class objects also represent the primitive Java types (boolean, byte, char, short, int, long, float, and double), as well as the keyword void. It has no public builder. The Java Virtual […]
August 29, 2022 | Java | No comments
Reflection is a runtime API for inspecting and modifying the behavior of methods, classes, and interfaces. The classes required for reflection are provided in the java.lang.reflect package, which is required to understand reflection. Reflection informs us about the class to which an object belongs, as well as the methods of that class that can be […]
August 29, 2022 | Java | No comments
In java.lang package, Java includes a wrapper class called Character. A single field of type char is contained in a Character object. The Character class provides several useful static (class) methods for manipulating characters. The Character constructor can be used to create a Character object. Constructor of Character wrapper class: Methods of Character Wrapper class: Methods […]
August 27, 2022 | Java | No comments