A walnut is a seed from a tree in the genus Juglans. Technically, a walnut is a drupe, not a nut, since it takes the form of a fruit enclosed by a fleshy outer layer which parts to reveal a thin shell with a seed inside. As walnuts age on the tree, the outer shell dries and pulls away, leaving the shell and seed behind.
After pollination, the fruit develops into a legume 3 to 7 cm (1 to 2 inches) long containing 2 to 3 (rarely 1 or 4) seeds, which forces its way underground to mature. Although a nut in the culinary sense, in the botanical sense the fruit of the peanut is a woody, indehiscent legume or pod and not technically a nut.
From Pocket Wikipedia, http://www.free-soft.ro/pocket-wikipedia/