Vikyath Ram has Published 176 Answers

Java DatabaseMetaData getProcedures() method with example

Vikyath Ram

Vikyath Ram

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

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

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

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

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

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

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

How to create a thread in Java

Vikyath Ram

Vikyath Ram

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

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.The Main thread in Java is the one that begins executing when the program starts. All the child threads are spawned from the Main ... Read More

Working with Matcher.start() method in Java Regular Expressions

Vikyath Ram

Vikyath Ram

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

The start index of the subsequence that was found by the group during the previous match operation is returned by the method java.util.regex.Matcher.start(). This method has a single argument i.e.the capturing group’s index for the specified pattern.A program that demonstrates the method Matcher.start() Java regular expressions is given as follows:Example Live ... Read More

Use boolean value to stop a thread in Java

Vikyath Ram

Vikyath Ram

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

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

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

Advertisements