2.4 Documentation and Style

“Don't stand there chattering to yourself like that,” Humpty Dumpty said, looking at her for the first time, “but tell me your name and your business.”

“My name is Alice, but—”

“It's a stupid name enough!” Humpty Dumpty interrupted impatiently. “What does it mean?”

“Must a name mean something?” Alice asked doubtfully.

“Of course it must,” Humpty Dumpty said with a short laugh: “my name means the shape i am—and a good handsome shape it is too. With a name like yours, you might be any shape, almost.”

—LEWIS CARROLL, Through the Looking-Glass

A program that gives the correct output is not necessarily a good program. Obviously, you want your program to give the correct output, but that is not the whole story. Most programs ...

Get Java: An Introduction to Problem Solving and Programming, 8th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.