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
In java.lang package, there is a wrapper class Boolean. A value of the primitive type boolean is wrapped in an object by the Boolean class. An object of type Boolean has a single field with the type boolean. Constructors for creating Boolean object: Methods of Boolean Wrapper class: Methods Description boolean booleanValue() Returns a primitive boolean […]
August 27, 2022 | Java | No comments
The Double class is a wrapper class for the primitive type double. It contains several methods for dealing with double values effectively, such as converting them to string representations and vice versa. A Double object can only hold one double value. Constructor of Double wrapper class: There are mainly two constructors to initialize a Double-object […]
August 27, 2022 | Java | No comments
The Float class is a wrapper class for the primitive type float. It contains several methods for dealing with float values effectively, such as converting them to string representations and vice versa. A Float object can only hold one float value. Constructor of float wrapper class: There are mainly two constructors to initialize a Float […]
August 27, 2022 | Java | No comments