Skip to content

Commit 4b4914b

Browse files
authored
Update QuickStart.java
1 parent 953ea8a commit 4b4914b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/jdbc/ConnectionSamples/QuickStart.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class QuickStart {
4545
*/
4646
public static void main(String args[]) throws Exception {
4747

48-
// Get the PoolDataSource for UCP
48+
// Get a pooled connection
4949
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
5050
// Set the connection factory
5151
pds.setConnectionFactoryClassName(CONN_FACTORY_CLASS_NAME);
@@ -87,7 +87,7 @@ public static void doSQLWork(Connection conn) {
8787
statement.executeUpdate(createSQL);
8888
System.out.println("New table 'todoitem' is created");
8989

90-
//Insert sample data
90+
//Sample data for populating the 'todoitem'
9191
String[] description = { "Task 1", "Task 2", "Task 3", "Task 4", "Task 5" };
9292
int[] done = { 0, 0, 1, 0, 1 };
9393

@@ -103,7 +103,7 @@ public static void doSQLWork(Connection conn) {
103103

104104
System.out.println("New records are inserted");
105105

106-
// Verify the data from the table "todoitem"
106+
// Query the 'todoitem' table to list tasks and task completion status
107107
ResultSet resultSet = statement.executeQuery("SELECT DESCRIPTION, DONE FROM TODOITEM");
108108
System.out.println("\nNew table 'todoitem' contains:");
109109
System.out.println("DESCRIPTION" + "\t" + "DONE");

0 commit comments

Comments
 (0)