Daniol Thomas has Published 242 Answers

Explain the difference between RowSet and ResultSet in JDBC?

Daniol Thomas

Daniol Thomas

Updated on 09-Mar-2020 06:42:48

Following are the differences between RowSet and ResultSet:ResultSetRowSetA ResultSet always maintains connection with the database.A RowSet can be connected, disconnected from the database.It cannot be serialized.A RowSet object can be serialized.ResultSet object cannot be passed other over network.You can pass a RowSet object over the network.ResultSet object is not a ... Read More

What is Result in JDBC? How to retrieve data from ResultSet object?

Daniol Thomas

Daniol Thomas

Updated on 09-Mar-2020 06:31:58

A ResultSet interface in JDBC represents the tabular data generated by SQL queries. It has a cursor which points to the current row. Initially, this cursor is positioned before the first row.Moving the pointer throughout result setThe next() method of the ResultSet interface moves the pointer of the current (ResultSet) object ... Read More

How can I alter the color of an HTML5 canvas element using jQuery?

Daniol Thomas

Daniol Thomas

Updated on 04-Mar-2020 08:00:00

To alter the color of an HTML5 canvas, use −document.getElementById("ID").style.background = red;You can also try the following −var ctx = canvas.getContext('2d'); ctx.fillStyle = "#FF0000"; ctx.fill();

Create a pattern with HTML5 Canvas

Daniol Thomas

Daniol Thomas

Updated on 04-Mar-2020 07:11:09

Use the following method to create a pattern with HTML5 Canvas: createPattern(image, repetition)− This method will use an image to create the pattern. The second argument could be a string with one of the following values: repeat, repeat-x, repeat-y, and no-repeat. If the empty string or null is specified, repeat ... Read More

How do we define a dialog box in HTML?

Daniol Thomas

Daniol Thomas

Updated on 03-Mar-2020 12:39:33

Use the <dialog> tag to define a dialog box in HTML. The following are the attributes −AttributeValueDescriptionopenopenopens a dialog box and user can interact with itExampleYou can try to run the following code to learn how to work with <dialog> tag −<!Doctype html> <html>    <head>       <title>HTML ... Read More

How to specify an image as a client-side image-map in HTML?

Daniol Thomas

Daniol Thomas

Updated on 03-Mar-2020 12:26:12

Use the usemap attribute to specify an image as a client-side image-map in HTML. You can try to run the following code to implement usemap attribute −Example<!DOCTYPE html> <html>    <head>       <title>HTML map Tag</title>    </head>    <body>       <img src = "/images/html.gif" alt = ... Read More

Section that contains only navigation links in HTML5

Daniol Thomas

Daniol Thomas

Updated on 02-Mar-2020 11:06:00

The HTML <nav> tag specifies a section that contains only navigation links. You can try to run the following code to implement <nav> tag in HTML5 −Example<!DOCTYPE html> <html>    <head>       <title>HTML Nav Tag</title>    </head>    <body>       <p>Database Tutorials:</p>       <nav> ... Read More

How to store data in the browser with the HTML5 localStorage API?

Daniol Thomas

Daniol Thomas

Updated on 25-Feb-2020 07:02:41

HTML5 localStorage saves string data in the browser and lasts beyond the current session. localStorage stores the data, with no expiration, whereas sessionStorage is limited to the session only. When the browser is closed, the session is lost.The Local Storage is designed for storage that spans multiple windows and lasts ... Read More

Best book to learn Java programming for beginners

Daniol Thomas

Daniol Thomas

Updated on 25-Feb-2020 06:14:12

Following books are on top from popularity and content wise and are a good resource to learn java programming from beginner to advance level.

A closer look at Java "Hello World" program

Daniol Thomas

Daniol Thomas

Updated on 24-Feb-2020 12:41:02

Let us look at a simple code that will print the words Hello World.ExampleLive Demopublic class MyFirstJavaProgram {    /* This is my first java program. *    This will print 'Hello World' as the output */    public static void main(String []args) {       System.out.println("Hello World"); // ... Read More

Advertisements