Category Archives: Java

A Little Java Character History

The Java language has supported Unicode from its beginning. In those early days, the Unicode character set defined characters with integer values in the range 0x0000 through 0xFFFF. That’s 65,536 possible character values in the full Unicode set. Java’s char type was defined to represent a single character in that range. However, Unicode changed. It… Read More »

LocalDate in Java 8

The java.time.LocalDate class is new in Java 8. Inspired by the Joda Time library, LocalDate represents a date as it might be used from a wall calendar. It is not a singular instant in time like java.util.Date. You might use a LocalDate to represent a birthday, the start of a school year, or an anniversary.… Read More »

Using Jersey (JAX-RS) with Spring

Spring does a great job for what it does — dependency injection, transaction management, database query simplification, and plenty of other things. Jersey, the reference JAX-RS implementation, is also excellent for what it does — it simplifies the creation of RESTful web services by providing a framework for defining resources, accessing them, and creating their… Read More »

Comparison of the Instant and Date Classes

Java 8 has a new java.time package, and one of its new classes is Instant. The best counterpart to this in past platforms is the java.util.Date class. There are a couple notable differences between Date and Instant: Date has very few useful methods, and Instant provides many. Instant provides finer time granularity and a longer timeline. Most… Read More »

Standard Charsets in Java 7

Once in a while I poke my nose through the release notes of new Java releases. It’s not a particularly rewarding activity, but this time I did find something interesting. Oddly enough, it was interesting for what it did NOT say. I was surprised, so I thought you might want to know about a new… Read More »

On Sale Already?

What, already on sale at Amazon? And it’s not even published yet! Java 7 Recipes will release sometime late December 2011.