FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
June 01, 2002
DocumentBuilder: An Alternative to Hard-Coded String Concatenation

(Page 1 of 12)
Matt Nicolls
Separating structure from content always begets a welcome flexibility. An effective deployment of Template Method, la Mail Merge in this case, does the trick.
Java Solutions June 2002/DocumentBuilder: An Alternative to Hard-Coded String Concatenation/Figure 1

Figure 1: Generating an INSERT SQL statement for a Customer object

0: String sql = "INSERT INTO Customer(SSN, Name, Address) ";
1: sql += "VALUES('";
2: sql += cust.getSSN() + "', '";
3: sql += cust.getName() + "', '";
4: sql += cust.getAddress() + "')";

— End of Figure —

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK