Q1: |
Why do some of the byte stream methods in this hour use integers as arguments? Shouldn't they be using byte arguments?
|
A1: |
There's a different between the bytes in a stream and the bytes represented by the byte class. A byte in Java has a value ranging from–128 to 127, while a byte in a stream has a value from 0 to 255. You often have to use int when working with bytes for this reason—it can hold the values 128 to 255, while byte cannot.
|
Q2: |
Can you suggest any good tutorials to expand into basic Java/database interactions with either Oracle or Microsoft SQL? Also, would this be done with JDBC?
|
A2: |
Java software can access relational databases with either Java Database Connectivity (JDBC) or the JDBC-ODBC Bridge. The same techniques are required in either case—your Java class loads a database driver and uses it to connect to the database and make queries. Sams Teach Yourself Java 2 in 21 Days (), a more advanced tutorial I coauthored with Laura Lemay, devotes a chapter to JDBC and JDBC-ODBC. Sample chapters and more information can be found on the web at http://www.java21days.com. Since you mentioned Oracle, you ought to take a look at Oracle and Java Development by Bulusu Lakshman (), also offered by Sams Publishing.
|
Q3: |
What kind of bird are colly birds or calling birds, the fourth present given away in the "12 Days of Christmas"?
|
A3: |
A colly bird is another name for a blackbird. Colly is an 18th century term that means to be dirtied with soot or coal dust. By the end of the carol, the true love has given the singer 364 gifts, including 36 colly birds. That always seemed a bit excessive to me, like he was feeling guilty about something.
|