Or would buying a very good book, and doing all the exercises be just as good?
Self study will be good if you have time. Going through Sun's tutorial and working out the examples is what I do most often.
Learning java involves familiarizing with java syntax, object oriented concept, performance of code and loop holes of java.
Depending on where you stand in the IT learning ladder a class may benefit you. Many of the people in my company who took Sun's instructor lead class found it difficult. Same was the case with other companies which do instructor lead classes.
To learn java the pace of the instruction should match the pace of the learning. If you are a quick learner an instructor lead class will benefit. Else a self study is best.
Even if you are a quick learner self study needs good direction.