Arushi has Published 141 Articles

Java ResultSet getType() Method with Example

Arushi

Arushi

Updated on 28-Jan-2025 14:57:12

1K+ Views

In JDBC (Java Database Connectivity), the ResultSet interface represents the result set of a database query in Java. One of the important methods provided by ResultSet is getType(), which returns the type of the ResultSet object. Result getType() method The getType() method is used to determine the type of cursor ... Read More

Java sql.Date setTime() method with example.

Arushi

Arushi

Updated on 29-Sep-2024 02:50:39

924 Views

In this program, we will connect to a MySQL database using JDBC, insert a new record into the dispatches table, and retrieve all records from the table. The setTime() method from Date class of java.util package that accepts a variable of long type, representing the number of milliseconds from the ... Read More

Java Connection getClientInfo() method with example

Arushi

Arushi

Updated on 19-Sep-2024 21:57:45

2K+ Views

In this article, we will learn how to retrieve and set client information properties in a MySQL database connection using the getClientInfo() method from the Connection interface in JDBC. The program demonstrates how to establish a connection to a database, set custom user credentials as client information properties, and then ... Read More

Java Connection getMetaData() method with example

Arushi

Arushi

Updated on 02-Aug-2024 18:19:16

2K+ Views

Generally, Data about data is known as metadata. The DatabaseMetaData interface provides methods to get information about the database you have connected with like, database name, database driver version, maximum column length, etc... The getMetaData() method of the Connection interface retrieves and returns the DatabaseMetaData object. This contains information about the ... Read More

Java Connection setTransactionIsolation() method with example

Arushi

Arushi

Updated on 05-Jul-2024 17:40:49

3K+ Views

In a database system, where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other ... Read More

Java ResultSet next() method with example

Arushi

Arushi

Updated on 31-May-2024 13:53:59

25K+ Views

When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface ... Read More

How to find the vowels in a given string using Java?

Arushi

Arushi

Updated on 07-Oct-2023 02:01:20

38K+ Views

You can read a character in a String using the charAt() method. To find the vowels in a given String you need to compare every character in it with the vowel letters. Example Live Demo public class FindingVowels {    public static void main(String args[]) {     ... Read More

How to automatically redirect a Web Page to another URL?

Arushi

Arushi

Updated on 12-Sep-2023 00:58:59

45K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header ... Read More

Multiple inheritance by Interface in Java

Arushi

Arushi

Updated on 02-Sep-2023 10:19:21

84K+ Views

An interface contains variables and methods like a class but the methods in an interface are abstract by default unlike a class. Multiple inheritance by interface occurs if a class implements multiple interfaces or also if an interface itself extends multiple interfaces.A program that demonstrates multiple inheritance by interface in ... Read More

Use overloaded methods to print array of different types in Java

Arushi

Arushi

Updated on 30-Jun-2020 08:38:41

917 Views

In method overloading, the class can have multiple methods with the same name but the parameter list of the methods should not be the same.Overloaded methods can be used to print an array of different types in Java by making sure that the parameter list of the methods contains different ... Read More

1 2 3 4 5 ... 15 Next
Advertisements