Posts from January 2014

7 result(s) found

Addition of integers - puzzle
Java

Consider the below codepublic class LongPuzzle{ public static void main(String args[]) { int a = 0123; int b = 3210; System.out.println(a+b); }}What is the result?Have you answered 4444? N...

Binary search algorithm and Java program
Java

Binary search is the advanced version of a linear search and Binary search logic is built to give a best optimum solution to search for an element in the list of values.

Regular expression for time validation
Java

Here the regular expression for time validation...^(([0-9]|([0-1]{0,1}[0-2])):[0-5][0-9]\\s{0,1}(AM|PM|am|pm|aM|Am|pM|Pm))|(((1[0-9])|(2[0-3])):[0-5][0-9])$Please note that \\s refers to a space chara...

JDBC - info on java.sql.ResultSetMetaData
Java

java.sql.ResultSetMetaData is an interface of JDBC API and the implementation has to be given by JDBC vendors. This interface is mainly used to identify the meta data information on the ResulstSet i.e...

JDBC - info on java.sql.DatabaseMetaData
Java

DatabaseMetaData is an interface as part of JDBC API to get a comprehensive information on the Database. The implementation for this interface is provided by the JDBC vendors.The methods defined in th...

JDBC data types (java.sql.Types)
Java

SQL is a standard and it is implemented by almost all database server vendors. As part of this standard, the grammar of the SQL is defined and it consists of the information about various data types t...

Java Calendar - Using Swings
Java

I've developed a Java calendar program which is based on Swing concept. Below the screenshot of my program. This program has two panels, one to hold the combo boxes and other one to hold the labels to...