in this post we will discuss about the inner classes in java. so what is inner class and when we should go for inner classes. Sometimes when we declare a class inside another class, such type of class is called…

User defined exception in java can be created by extending any predefined exception. User defined exception in java are also called Custom Exceptions. In java if we are developing an application and get some requirement to instruct the user who…

Enum was introduced in java 5. Enum types in java is a special type of class to define collection of constants. Variables in enum are constants so there name should be in uppercase letters. In java we define an enum…

Bubble Sort in Java is a bubble sorting algorithm, in which elements of the list gradually rise or bubble to their proper location in the array. Bubble sort algorithms cycle through a list, analyzing pairs of elements from left to…

There are different ways to Split the String in Java, out of which some common ways are shown to Split String in Java. Here in this Example We will Split the String using the String Split Method.

output:-  …

We can list all column names of table using java.sql.DatabaseMetaData.getColumns() method. The getColumn method accepts String catalog, String schemaPattern, String tableNamePattern and String columnNamePattern parametres. It retrieves a description of table columns available in the specified catalog. The method return…

We can list all table names of database using java.sql.DatabaseMetaData.getTables() method. The getTables method accepts catalog, schemaPattern, tablenamePattern, types parameters and returns ResultSet where each row is table description. Each table descriptor contain the following columns: String TABLE_CAT represents table…

We can check if database exists using java.sql.DatabaseMetaData interface. using DatabaseMetaData interface we can obtain the meta data about the database catalog, for example we can obtain the database name, tables available in that database, columns in that table etc.…