Race relations have undergone a curious flip-flop. Polls show blacks feel more optimistic about the nation's future than whites, despite the Great Recession that's giving everybody the blues.

Having a black, or, if you prefer, biracial, president explains a lot of that optimism, polls show. But white Americans, particularly working-class whites without a college diploma, have become more gloomy.

Ronald Brownstein, political director and demographic specialist at the National Journal, recently described whites who have less than a four-year college degree as "the most pessimistic and alienated group in American society."

He cited a March poll by the Pew Charitable Trusts' Economic Mobility Project in which two-thirds of blacks and Hispanics said they expected to be better off economically in 10 years. So did 55 percent of college-educated whites. But only 44 percent of non-college whites agreed.

That's a storm cloud on the horizon for President Obama. Incumbents don't get re-elected when too many people dislike the direction in which the country is headed.

That makes the upbeat mood in black America, a more traditionally alienated sector, all the more significant. Despite high black unemployment, black Americans in polls and interviews still are encouraged largely by an overwhelmingly historic event: Obama's cracking of the world's thickest glass ceiling, his presidential election.

Ample evidence to support that sunny mood is offered in "The End of Anger: A New Generation's Take on Race and Rage" by Newsweek writer Ellis Cose. Racism is still around, but Obama's victory was a decisive indication of how it no longer is the barrier it used to be.

Even so, Cose also acknowledged in his book and in a telephone interview with me that this new rosy outlook is "not totally rooted in a rational analysis of reality." Blacks still have "their lowest employment since statistics have been kept," he pointed out, and middle-class African-Americans are at greater risk than their white counterparts of slipping back into a lower income and status.

After hundreds of interviews and surveys, Cose found his respondents fell into at least three distinct generational attitudes toward race and opportunity:

* The "Fighters," born before 1945, who bore witness to the civil rights movement of the 1950s and 1960s.

* The "Dreamers," postwar baby boomers who lived through or participated in the angry urban uprisings of the 1960s.

* The "Believers," members of the post-1960s generation who, even when they run into racial glass ceilings, don't feel as daunted by the challenge.

Cose happens to quote me (Thank you!) as an example of that second group. I recounted how the urban riots of the late 1960s opened up jobs for the first generation of black journalism graduates to be hired by mainstream newsrooms.

Obama was elected partly because he and his campaign team grasped generational changes more intelligently than most of us older folks did. Now he needs to show a similar grasp of the current working-class discontent that crosses racial lines. As race recedes as a mighty barrier to individual opportunity, class barriers persist.

As Cose concludes, we will not truly fulfill King's prophecy that all races will "sit down together at the table of brotherhood" if the rich sit at one table while the poor sit at another.