Arushi has Published 152 Articles

Java DatabaseMetaData getDriverName() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

267 Views

The getDriverName() method of the DatabaseMetaData interface returns the name of the JDBC driver used.To get the name of the JDBC driver used to connect with the database.Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the ... Read More

Java DatabaseMetaData getJDBCMinorVersion() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

36 Views

The getJDBCMinorVersion() method of the DatabaseMetaData interface returns the minor version of the JDBC driver in integer format.To get the major version of the JDBC driver −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver ... Read More

Java DatabaseMetaData getTables() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

3K+ Views

This method retrieves the description of the tables available in the specified database/catalog. It accepts 4 parameters −catalog   − A string parameter representing the name (or, name pattern) of the catalog (database in general) in which the table (that contains the columns of which you need to retrieve the ... Read More

Java DatabaseMetaData getURL() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

305 Views

This method retrieves the URL of the underlying Database Management System and returns in the form of a String variable.To get the list URL of the underlying DBMS −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of ... Read More

Java ResultSet moveToInsertRow() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

748 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

Java ResultSet last() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

3K+ 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 in ... Read More

Java ResultSet getType() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

713 Views

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 in general).The type of the ResultSet object determines the type of the result ... Read More

Java ResultSet getMetaData() method with example

Arushi

Arushi

Updated on 30-Jul-2019 22:30:26

5K+ 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 in ... Read More

Static import the Math Class Methods in Java

Arushi

Arushi

Updated on 30-Jul-2019 22:30:24

15K+ Views

Static import means that the fields and methods in a class can be used in the code without specifying their class if they are defined as public static.The Math class method sqrt() in the package java.lang is static imported.A program that demonstrates this is given as follows:Example Live Demoimport static java.lang.Math.sqrt; ... Read More

Get Hash Code for Integer in Java

Arushi

Arushi

Updated on 30-Jul-2019 22:30:24

2K+ Views

The HashCode for an Integer can be obtained using the hashCode() method in Java. This method does not accept any parameters and it returns a hash code value of the Integer object.A program that demonstrates the hashCode() method in Java is given as follows:Example Live Demoimport java.lang.*; public class Demo { ... Read More

Advertisements