Rishi Raj has Published 119 Articles

Java ResultSetMetaData getPercision() method with example

Rishi Raj

Rishi Raj

Updated on 10-Feb-2025 11:28:01

364 Views

In this article, we will learn how to retrieve the size of a specified column in a ResultSet object using the getPrecision() method of the ResultSetMetaData interface in JDBC. What does getPrecision() in ResultSetMetaData do? The getPercision() method of the ResultSetMetaData (interface) retrieves the size of the specified column in the ... Read More

How to create immutable class in Java?

Rishi Raj

Rishi Raj

Updated on 28-Jan-2025 11:39:52

1K+ Views

An immutable class object's properties cannot be modified after initialization. The state of an immutable object remains constant throughout its lifetime. To achieve immutability, the class is designed such that its fields are initialized only once through a constructor, and no methods are provided to modify those fields. For example: ... Read More

Java DatabaseMetaData getDatabaseMinorVersion() method with example

Rishi Raj

Rishi Raj

Updated on 02-Jan-2025 19:13:43

119 Views

In this article, we will learn how to use the getDatabaseMinorVersion() method of the DatabaseMetaData interface in Java to retrieve the minor version of the underlying database. This method helps check the version details of the connected database. What is DatabaseMetaData?The DatabaseMetaData is an interface ... Read More

Java Connection getTransactionIsolation() method with example

Rishi Raj

Rishi Raj

Updated on 30-Dec-2024 19:13:58

698 Views

In this article, we learn the Connection getTransactionIsolation() method in Java, which allows you to determine a database connection's current transaction isolation level. Transaction isolation levels dictate how transactions interact, particularly regarding data locking during reads or writes. What is the getTransactionIsolation() Method? The getTransactionIsolation() method is part of the ... Read More

Java DatabaseMetaData getCatalogs() method with example

Rishi Raj

Rishi Raj

Updated on 14-Nov-2024 17:40:52

838 Views

In this article, we’ll look at how to retrieve and display the list of available catalogs (databases) in a MySQL instance using Java’s JDBC (Java Database Connectivity) API. By running a Java program that connects to the MySQL server, we’ll use the DatabaseMetaData class to fetch catalog names with the ... Read More

Java DatabaseMetaData supportsGroupBy() method with example

Rishi Raj

Rishi Raj

Updated on 08-Nov-2024 22:27:02

129 Views

In this article, we will learn how to check whether a database supports the SQL GROUP BY clause using JDBC in Java. The GROUP BY clause is used to organize identical data into groups in SQL queries, typically following the WHERE clause and preceding the ORDER BY clause. With JDBC, ... Read More

Java ResultSetMetaData getTableName() method with example

Rishi Raj

Rishi Raj

Updated on 29-Oct-2024 00:38:12

1K+ Views

In this article, we will use Java’s JDBC to connect to a MySQL database and retrieve the name of the table associated with a specific column in a ResultSet. By accessing the ResultSetMetaData interface, we can utilize its getTableName() method to identify the table that contains a given column, which ... Read More

Java Connection getAutoCommit() method with example

Rishi Raj

Rishi Raj

Updated on 18-Oct-2024 11:56:37

879 Views

In this program, we will establish a connection to a MySQL database and check the current auto-commit setting using the getAutoCommit() method from the Connection interface. We will first disable the auto-commit feature using setAutoCommit(false) and then retrieve the current auto-commit status with getAutoCommit() to verify if it has been ... Read More

Wide Area Network (WAN)

Rishi Raj

Rishi Raj

Updated on 31-Oct-2023 02:46:38

25K+ Views

A wide area network (WAN) is a computer network that covers a large geographical area comprising a region, a country, a continent or even the whole world. WAN includes the technologies to transmit data, image, audio and video information over long distances and among different LANs and MANs.The distinguishing features ... Read More

Duplicating Objects using a Constructor in Java

Rishi Raj

Rishi Raj

Updated on 30-Jun-2020 08:44:29

397 Views

A copy constructor can be used to duplicate an object in Java. The copy constructor takes a single parameter i.e. the object of the same class that is to be copied. However, the copy constructor can only be explicitly created by the programmer as there is no default copy constructor ... Read More

1 2 3 4 5 ... 12 Next
Advertisements