Motorola alone stated in a public briefing in early November 1999 that it had already ported the KVM to 12 different platforms. I fully realize that article code is produced to different deadlines than industry-quality code, but still I feel that publicized source code should be of the highest quality possible, especially when published as example code in magazines or books. Most of the identifiers in your example are very poor. Take the name of your Scanner class, for example. Being a public class, its name should clearly reflect its purpose and be easily memorized.
Scanner is neither.
The mild pain of having to work with long identifiers is repaid a hundredfold when readers effortlessly glide over your source and instantly comprehend its meaning, or during program maintenance, when program readability is a prime requirement. Next, I hope you agree that the error messages passed to your NullPointerException are virtually useless. When devising such error messages, I always try to put myself in the shoes of a user who doesn't know my program at all. Identifiers should accurately reflect the logical meaning of their runtime purpose. You should use manifest constants for these.