Vikyath Ram has Published 151 Articles

Java DatabaseMetaData getProcedures() method with example

Vikyath Ram

Vikyath Ram

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

418 Views

This method retrieves the description of the stored procedures of a database/catalog. It accepts 3 parameters −catalog: A string parameter representing the name of the catalog (database in general) in which the procedure exists. Pass "" to get the description of the primary key columns in tables with no catalog ... Read More

Java DatabaseMetaData getIndexInfo() method with example

Vikyath Ram

Vikyath Ram

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

516 Views

This method retrieves the description of the indices of a table. It accepts 5 parameters −catalog − A string parameter representing the name of the catalog (database in general) in which the table (that contains the indices of which you need the description of) exists, pass "" to get the ... Read More

Java DatabaseMetaData getUserName() method with example

Vikyath Ram

Vikyath Ram

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

780 Views

This method retrieves the user name used to establish the current connection −To retrieve the user name as known to 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 driver class corresponding to the ... Read More

Java ResultSet insertRow() method with example

Vikyath Ram

Vikyath Ram

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

2K+ 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 general).The ... Read More

Java ResultSet getRow() method with example

Vikyath Ram

Vikyath Ram

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

6K+ 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

Using the finalize() method in Java Garbage Collection

Vikyath Ram

Vikyath Ram

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

965 Views

When a garbage collector determines that no more references are made to a particular object, then the finalize() method is called by the garbage collector on that object. The finalize() method requires no parameters and does not return a value.A program that demonstrates the finalize() method in Java is given ... Read More

Use boolean value to stop a thread in Java

Vikyath Ram

Vikyath Ram

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

701 Views

A thread can be created by implementing the Runnable interface and overriding the run() method. Then a Thread object can be created and the start() method called.A thread can be stopped using a boolean value in Java. The thread runs while the boolean value stop is false and it stops ... Read More

The extends Keyword in Java

Vikyath Ram

Vikyath Ram

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

4K+ Views

An object can acquire the properties and behaviour of another object using Inheritance. In Java, the extends keyword is used to indicate that a new class is derived from the base class using inheritance. So basically, extends keyword is used to extend the functionality of the class.A program that demonstrates ... Read More

Use a character class in Java Regular Expressions

Vikyath Ram

Vikyath Ram

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

105 Views

A character class is set of characters that are enclosed inside square brackets. The characters in a character class specify the characters that can match with a character in an input string for success. An example of a character class is [a-z] which denotes the alphabets a to z.A program ... Read More

Pattern.matches() method in Java Regular Expressions

Vikyath Ram

Vikyath Ram

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

132 Views

The java.util.regex.Pattern.matches() method matches the regular expression and the given input. It has two parameters i.e. the regex and the input. It returns true if the regex and the input match and false otherwise.A program that demonstrates the method Pattern.matches() in Java regular expressions is given as follows:Example Live Demoimport java.util.regex.Pattern; ... Read More

Advertisements