THE communities of Fairfield , Glen Ridge , N.J. , and Great Neck and Pelham in New York have several things in common : first-rate public schools , stately homes on tree-lined streets and municipal amenities like well-groomed parks and fine libraries .