Gamal Abdel Nasser created and molded public opinion in Egypt in his stormy likeness. Anwar Sadat defiantly ignored it. Egypt's current ruler, Hosni Mubarak, deals with public opinion by worrying about it and following it.

"I cannot stand against public opinion," Mubarak says as he discusses subjects ranging from American-Arab relations to his ambitious domestic economic programs. "No president can. Not even President Reagan would stand against American opinion."

Beginning his fourth year in power, Mubarak, who was a career military officer before Sadat selected him as his vice president and successor, hardly seems a candidate to spend a lot of time pondering the force of public attitudes toward his rule. His government demonstrated in elections last year that it can organize voting to deliver whatever parliamentary majority it chooses.

Moreover, the Army that staged the 1952 revolution and provided the essential support for Nasser and Sadat, also ex-officers, at crucial times appears to be solidly behind the cautious, reliable Mubarak. But it is likely that the experience of watching as Sadat was shot to death on an Egyptian parade ground by soldiers angered by his policies and Pharaonic style of governing has helped focus Mubarak's attention on the opinions of his subjects.

An interview with Mubarak in the small, modest office he uses in the Orouba Palace here suggests that he studiously seeks ways to underscore the contrasts between his quiet, easy style and the flamboyance, unpredictability and intermittent fury of the decade of Sadat's rule.

Interviews with Sadat, who delighted in surprising his country and the world with "electric shocks," which included surprise war and peace campaigns with Israel, were frequently stage-managed affairs. Sadat would alternate folksy story-telling with taking out maps and illustrating vast geopolitical movements with arrows, interrupting each mood to hurl insults at his Arab rivals as his temper rose.

Where Sadat might have seized the chance to call Saudi Arabia's rulers "dwarfs" or worse, Mubarak, wearing a tailored dark pin-striped suit, quietly puffs on a large cigar and pauses to think when asked about King Fahd's recent visit to Washington, which Mubarak will visit starting March 9.

His response is a polite evasion that makes clear that he is convinced he will bring home much more progress on a Middle East peace settlement than did Fahd. But he will not say so until he has it in hand.

The discussion also makes it clear that Mubarak does not enjoy the kind of grand maneuvering on the world stage that Nasser and Sadat mastered. Instead, he will make his mark in history through satisfying Egyptian public opinion with domestic reforms and economic recovery. If contributing to a broader Arab-Israeli peace will get him economic aid and investment from the United States and elsewhere to fulfill those goals, then he will be involved in the Middle East's version of the moveable diplomatic feast -- "the peace process."

He fences skillfully on questions about the peace process and other international topics, but he comes to life when discussing his efforts "to spend in five years more than has been spent in 50 years on our infrastructure, on roads, telephones, sewers, transportation."

Sadat asked Egyptians to dream. Mubarak in his blunt, unrefined manner, asks them to be realistic. The phrase "Let's be realistic" recurs throughout the 90-minute conversation a dozen times. "Listen my friend," he says at another point when asked to compare his approach on peace to Fahd's, "whenever I speak about one thing, I am not going to mention other things, too." Only occasionally does he interrupt his rapid English to grope for a word, which is immediately supplied by a nervous aide monitoring the interview.

The Mubarak era has coincided with a building boom around Cairo that has at least lessened, if not halted, the sense of physical decay that afflicts this overstuffed city of 12 million.

An import binge has brought a profusion of consumer goods into Egypt's stores that startles a visitor accustomed to the bare shelves and shuttered shops of a decade ago. But the binge appears to be ending as Mubarak's economists tell him that the economy now has to be put through a wringer to get inflation down and market-distorting subsidies eliminated. They are also warning him that such changes could lead to explosive pressures in public opinion, and Mubarak is passing those warnings on to the United States as he seeks more aid in his trip to Washington.

Mubarak treads gingerly when asked about the strength of Islamic fundamentalism, which influenced the soldiers who killed Sadat. He professes that it is not very strong in Egypt and suggests it can be handled primarily as a public opinion problem, through organizing weekly seminars in mosques in which government-sponsored sheiks can respond to problems raised by the fundamentalists.

"Other countries in the region are asking for Egypt's advice on how we deal with this," he says. Asserting that Egypt's law already recognizes the fundamental principles of Islam, Mubarak adds, "we are tackling this problem in our own way, quietly and easily."