Skip to main content

Cay Horstmann

Cay Horstmann is author of Core Java (Sun Microsystems Press 1996-2009), Enterprise Java for Elvis (Sun Microsystems Press, to appear), and co-author of Core JSF (Sun Microsystems Press 2004-2009) Cay is professor of computer science at San Jose State University. He is a computer science series editor at Prentice-Hall and a frequent speaker at computer industry conferences. For four years, Cay was VP and CTO of an Internet startup that went from 3 people in a tiny office to a public company.


cayhorstmann's blog

JavaOne 2011 Day 1

Posted by cayhorstmann on October 3, 2011 at 11:45 PM PDT

Today, JavaOne started officially. With the traditional keynote. Except, traditionally, the keynote is in a huge room that has space for everyone. Today, people were shunted into overflow rooms where they could watch on monitors. In the age of the screencast, that seems pointless—why is that better than watching on your laptop?

JavaOne 2011 Day 0

Posted by cayhorstmann on October 2, 2011 at 11:08 PM PDT

Once again, I got a blogging pass to JavaOne—my fifth year as the intrepid reporter at JavaOne, and my 15th JavaOne attendance. Sadly, that wasn't enough to get me the coveted Alumni badge—my email address wasn't in the right Oracle database, and showing my previous conference blogs didn't impress the conference staff.

Complexity is in the Eye of the Beholder

Posted by cayhorstmann on September 3, 2011 at 6:52 AM PDT

Scala for the Impatient—Free Chapters at

Posted by cayhorstmann on August 26, 2011 at 2:33 PM PDT

My hard-hitting, tell-it-as-it-is Scala book draft is coming along. No animals or fruit have been pressed into service for contrived examples. Free chapters are at ♦

Whatever Floats Your Boat

Posted by cayhorstmann on August 14, 2011 at 5:14 PM PDT

Inner Classes in Scala and Java

Posted by cayhorstmann on August 5, 2011 at 4:19 PM PDT

Java 7 Unsafe at Any Speed?

Posted by cayhorstmann on July 29, 2011 at 4:32 PM PDT

In Praise of Language Specs

Posted by cayhorstmann on June 27, 2011 at 7:25 AM PDT

I give an example of why having a language spec builds confidence in a situation that would induce fear and trembling in a seat-of-the-pants programming language. I boldly generalize to posit that it is good to have multiple implementations of a spec, and that there should be more than one implementation of the Java platform. ♦

There Will Be Monads

Posted by cayhorstmann on June 18, 2011 at 9:37 PM PDT

I finished my "modern programming languages" course at the Ho Chi Minh City University of Technology. We covered metaprogramming (with Ruby and Rails), continuations (with Racket and Scala), concurrency (with Scala and Clojure), and finished off with a dose of Haskell to see type inference and type classes in action. Here are the hardy souls who stuck it out until the end.

Easy Red-Black Trees

Posted by cayhorstmann on May 12, 2011 at 3:46 AM PDT

A red-black tree is a binary search tree with the following additional