SACRAMENTO, CALIF. -- Thirty years ago, two prelaw students from Stanford University set out together by steamship for a summer tour of Europe. They had hoped for a ship full of young people and had drawn instead what appeared to be a massive group of vacationing retirees, but John Hamlyn's spirits were slightly lifted when his friend began to unpack. Tucked into the suitcase was a full quart of hundred-proof Yellowstone whiskey -- purloined, Hamlyn gathered, from the liquor cabinet in his friend's Sacramento home.

This struck Hamlyn as entirely out of character but a very good idea, and he said so.

"He said, 'No, it's strictly for medicinal purposes,' " Hamlyn said recently, still looking rueful. "Which I took as a joke. Unfortunately, it wasn't a joke. I never got one drop of it, and it was put into most of the sinks in Europe every time Tony felt like he was getting a sore throat."

That, Hamlyn said, was the Anthony Kennedy he knew: the driven one, the smart one, who used to tell his friends how his father offered in affectionate despair to pay him $100 if just once he would do something requiring his parents to come pick him up at the local police station. Anthony Kennedy never collected.

"It always seemed to me that when we did something naughty, Tony went home," Hamlyn said. "He had a code as a little boy that he just didn't get into any trouble."

When President Reagan last month announced the Supreme Court nomination of Anthony McLeod Kennedy, the 9th Circuit Court of Appeals judge whose confirmation hearings begin today, Hamlyn was watching his friend on television and smiling, especially as reporters asked if Kennedy had ever smoked marijuana. For Hamlyn and the scores of other longtime friends, it was hard to fathom a more implausible prospect than that of genteel, careful Anthony Kennedy even considering an experiment with marijuana.

"If there's anybody I know who's 50 who I had to bet $10,000 hadn't ever touched it, I would say Tony's the one," said R. Dobie Langenkamp, a Tulsa oil and gas businessman who went through Stanford and later Harvard Law School with Kennedy.

When Langenkamp knew him best, he said, Kennedy was already famous among his friends both for his enthusiasm for the intellectual challenge of the law and for the good-humored but unwavering attention he had always devoted to studies that friends say he hoped might someday make him a judge.

"He said that for every unit, you need 30 minutes of sleep," said David Dozier, a Sacramento neurosurgeon who was one of Kennedy's two closest childhood friends and roomed with him for a time at Stanford. "He was taking 18 units at the time, so he always got nine hours of sleep . . . . plus supplementary napping."

The celebrated student is 51 now; he favors sober suits, plays what is said to be an unmemorable game of golf, and has three grown children. But Kennedy leaves for work each morning from the same house where John Hamlyn used to help him pull baseball bats from the closet for impromptu games on the street, and there is no indication that much else about him has substantially changed either.

Since his nomination was announced, he has declined all interviews, concentrating instead on readying himself for the proceedings that begin today, and that is entirely in keeping with Kennedy's longtime image here as a man given to intense preparation, quiet humor, and a personal conservatism that pervades cautious legal opinions and the conduct of his daily life.

He has been married to Mary Davis Kennedy, a schoolteacher, for 24 years. His politics have always been Republican, low-key, and private. Controversy, the people around him say, is something Kennedy seems eager to avoid.

"He's just extremely cautious and conservative in every way," said a judge who has worked with Kennedy but asked to remain anonymous. In nearly every opinion Kennedy has written, this judge said, the Supreme Court nominee has stuck closely to the immediate issues under consideration, declining to address larger controversies or express strong ideological positions.

"He's never given any indication that he wants to go out and rewrite the court," the judge said, drawing a distinction between Kennedy and Reagan's earlier nominee Robert H. Bork, whose nomination was rejected by the Senate. "I think he's far more traditional than Bork. I think he's far more likely to respect precedent."Surprising Theatrical Flourish

When Kennedy was scheduled last month to address a Federal Bar Association celebration of the Constitution, the judge introducing him announced to the gathering that Judge Kennedy had unfortunately been called away at the last minute, but that a substitute had been drafted to take his place. Then the speaker, a white-wigged gentleman in a plum-colored jacket and ruffled shirt, stepped to the podium and introduced himself as James Madison. Without a note or a cue card, and without ever breaking character as one of the founding fathers of the land, Anthony Kennedy delivered a passionate and intricately researched account of the drafting of the Constitution.

When he was finished, more than one member of his applauding audience was astonished -- partly because Kennedy's speech was so eloquent, and partly because its theatrical flourish seemed extraordinary in a man so well known for his decorum. "He's the kind of person that you would never expect to see cross the street against a red light," said the judge, who requested anonymity. "I don't think he'd smoke a regular cigarette, let alone pot."

By all accounts, Kennedy grew up that way, the second child of parents by then deeply imbedded in the civic life of the modestly proportioned city that serves as California's state capital.

Kennedy's father, Anthony J. (Bud) Kennedy, was a lawyer and lobbyist locally famous for his charm and caginess amidst old-line California politics; the senior Kennedy was reputed to have helped finance his law school years as a poker player, a tale he apparently made no effort to discourage, and that image stayed with him throughout much of his working life. He was Catholic and a Republican, passing on both his politics and his Sunday churchgoing to his son, but neither ideology nor religion seemed to feature very prominently in Bud Kennedy's public presence.

"Kind of a shrewd, cardplayer's view of life," said Dozier, who remembers vividly the big white house with the train set and the ping-pong table and the closet perpetually stocked with sports equipment.

Neighborhood children looked on the Kennedy house as the sort of place where the doors were always unlocked and something interesting was always afoot, and much of that was the work of Tony Kennedy's mother Gladys, a famously energetic woman who seemed to found volunteer organizations as often as she served on them.

"A lot of business was done over the breakfast room table or the back patio," said Dana Smith, a petroleum and chemical executive who was married to the younger Anthony Kennedy's late sister Nancy. "You might find anybody in there, from the Portuguese immigrant {Sacramento River} Delta farmer . . . . You could find the grocer stopping off and having a drink after he'd closed his store. You could find the priest in there."

Tony Kennedy bicycled to Mass with his friend John Hamlyn, and together they served as altar boys. Kennedy wore glasses and kept making the honor roll -- the McClatchy High School yearbooks show an earnest, wiry boy smiling out from every year's lineup of the California Scholarship Federation, and a teacher who arrived at McClatchy a year after Kennedy's graduation said recently that he can still remember the talk the Kennedy boy left in his wake.

"Every time I would go into the lunchroom in the fall, and they'd be discussing who the outstanding seniors were for that year," said William Morgan, now principal at another Sacramento high school, "the one they always compared them to was -- 'Well, is that person as good as Tony Kennedy was?' "

He had always assumed, according to his friends, that he would graduate from Stanford like his mother and become a lawyer like his father. When the three close friends went off to Stanford together, Kennedy was assigned a dreadful basement dormitory room, where the small transom window opened out to the dirt kicked up by passing students, but took it in stride.

He liked Stanford, and there was one series of classes that seemed particularly to elate him. The courses focused on constitutional law, and they were taught by a rigorous professor who worked his undergraduates as though they were law students, demanding that they brief individual cases and prepare for intense questioning in class.

"He was a brilliant student," said Robert Horn, the now-emeritus Stanford professor who taught the constitutional law courses. Stanford was rich with bright students, Horn said, but among them a much smaller group seemed passionate not solely about academic excellence but also about the process of learning and the questions raised by the history and interpretation of the American Constitution. "Tony was clearly one of that relatively small group," said Horn.

Kennedy spent a year at the London School of Economics before moving on to Harvard -- according to one published account, he had finished his Stanford graduation requirement in three years, but his father insisted he was too young to begin law school right away. When he settled into Harvard, constitutional and tax law seemed to interest Kennedy the most, his roommate Langenkamp said.

There were heated discussions in their shared rooms at Harvard, just as there had been at Stanford, but the arguments were usually about history and abstract questions of law, Langenkamp said. Neither he nor the dozens of other Kennedy friends and associates interviewed for this article say they have any memory of Kennedy's arguing a particular strong stance on politics or issues of controversy such as abortion, the civil rights movement, or later, the United States' entry into Vietnam.

"We were coming out of the Eisenhower era," Langenkamp said. "It was really one of considerably less involvement." 'Bashful Lobbyist'

Kennedy graduated cum laude from law school, was taken into a prestigious San Francisco firm, and within a year was back in Sacramento to cope with his father's estate. The senior Kennedy had died of a heart attack while on a business trip in Los Angeles, and despite his relative inexperience, Tony Kennedy took over his father's Sacramento law practice, lobbying clients and all.

The men who watched Kennedy work, lobbyists and legislators alike, saw a businesslike young man who evidently had little interest in courting legislators with the cocktail party and enthusiastic handshake. His clients included the Schenley distillery company and an opticians' organization, and men then in the California legislature describe him as having been invariably well-prepared, brisk, and low-key as he argued his client's position on a pending bill.

"He was a bashful lobbyist, as compared to the public image of a backslapping, cigar-smoking, let's-go-have-a-drink good old boy," said San Francisco attorney Bill Bagley, who served in the California state assembly for 14 years. "He didn't want to accost people, and say, 'Hey, man, give me a vote.' It's not his style."

The Schenley company encountered legal difficulties during the time Kennedy represented it in Sacramento -- among other problems, the company was fined for certain marketing practices found to be illegal -- but there has been no reported evidence of impropriety on Kennedy's part. Around much of Sacramento he was not thought of principally as a lobbyist at all; the younger Kennedy, Sacramento veterans said, was entirely different from his gregarious and politically adept father.

"He acted like it was something he really wasn't enjoying," said former state senator Paul Lunardi, who left politics in 1966 and became a lobbyist for the Wine Institute. "I think he wanted to be a lawyer more than a lobbyist." A Tendency to Lecture Judges

As a lawyer, Kennedy was developing some expertise in tax law and was still keenly interested in constitutional matters -- one of his own partners, in fact, once suggested that Kennedy might be better received in court if he could curb his tendency to begin lecturing judges on the fine points of constitutional law. Gordon Schaber, the dean of Sacramento's McGeorge School of Law, had offered Kennedy a part-time teaching position and was impressed early on by the enthusiasm Kennedy showed whenever he began speaking to students.

"He walks into a classroom carrying a sheaf of notes, and it takes students a little while to realize that at the end of the class, after 2 1/2 hours, he will just pick up the notes and walk away, having never turned the page," Schaber said. "I once told him that he not only ate and breathed the law, as we say in law schools, but he must have slept it as well."

Kennedy was known to be a Republican, if not a particularly public one, and in the early 1970s his name was brought to the attention of Lewis Uhler, a state official who had been asked by then-Gov. Ronald Reagan's administration to head a task force on tax revision. Uhler, who was friendly with one of Kennedy's law partners, asked Kennedy to help in the preparation of a ballot proposition that would change the California constitution to place an annual cap on state spending.

"He shared the objectives and the view that you ought to limit government," said Uhler, who now heads the National Tax Limitation Committee from an office in Roseville, Calif. Kennedy played no active part in the political argument over the ballot proposition, Uhler said; his role was as draftsman of the language that would actually appear in the proposition itself.

"He obviously as a constitutionalist enjoyed fashioning the constitutional language and concepts," Uhler said. "He was very well organized, very deliberate, but worked very ably with a variety of people, some of whom were contentious."

The proposition failed at the polls, but Kennedy's effort had been appreciated by the Reagan administration. When a 9th Circuit Court of Appeals opening became available in 1975, Kennedy's name was passed on to the White House, and at the age of 38 he was asked to assume the bench -- something his associates say he had very much wanted to do.

He was one of the youngest appellate justices in the nation's history. "I think people chuckled," said Charles Mack, counsel for the county that borders Sacramento. "And then he gained people's respect very quickly."

Over the next 12 years, Kennedy wrote nearly 400 opinions and established among most of his colleagues a reputation as a cordial and thorough jurist who could be relied on to give serious attention to all sides in a case before him. Former law clerks, initially attracted to Kennedy by what they describe as the extremely high regard in which his clerkships are held, say that while they were helping prepare opinions the judge enjoyed debating with them, suggesting different approaches to legal problems and then listening with real attention to their responses -- especially, one clerk said, when the cases concerned constitutional issues or the balance of power between branches of government.

"He would hold onto them longer than other cases," said Vince Chiarello, a San Francisco attorney who clerked for Kennedy six years ago. "{He} wanted to think about them, and try new approaches."

Kennedy associates on the court have described the same qualities, which they add do not always coincide with a position on the federal bench. "Sometimes you feel you're banging your head against a stone wall, and you don't have that feeling when you're talking to him," said a 9th Circuit judge who has often disagreed with Kennedy's rulings but found him uniformly reasonable and open to argument in his conversations and written memoranda. As a Supreme Court justice, this judge said, "I think he would be open to education on various issues, to the extent that you could persuade somebody who starts with a very conservative view."

Some of Kennedy's best-known rulings are generally cited as evidence of his conservatism. In 1980 he upheld the right of the Navy to discharge homosexuals, citing the "importance of the governmental interests" involved, but adding that he did not necessarily approve of the discharge rule. "Upholding the challenged regulations as constitutional is distinct from a statement that they are wise," Kennedy wrote.

And in 1985, when faced with a lower court decision requiring Washington State to give male and female employes equal pay for what were described as jobs of equal worth, Kennedy overturned the lower court and ruled that federal sex discrimination law "does not obligate {the state} to eliminate an economic inequality which it did not create."

His view of society, said one colleague on the bench, might be perceived by his critics as the product of a life spent in the relative shelter of a genteel California neighborhood and prestigious private schools. "I think it's a different life experience," said this judge, who respects Kennedy's thoughtfulness but has disagreed with many of his findings and wonders sometimes about Kennedy's understanding of the barriers faced by people less fortunate than himself. "He just doesn't know any of those people . . . . His Harvard Law School education shows, in the sense that he appears to be somewhat aloof, almost apart."

That perception is shared by civil rights activists who have complained publicly that Kennedy has appeared unsympathetic to some racial and ethnic discrimination cases brought before him. His country club memberships have also come under attack; although Kennedy told members of the Senate Judiciary Committee that he resigned from one club seven years ago and a second last fall because the clubs were discriminating against women or minorities, the National Organization for Women objected that the resignations came "too late" to provide convincing proof of Kennedy's sincerity.

NOW representatives are expected to testify this week against Kennedy's nomination. But no one expects the nomination hearings to last nearly as long or offer nearly the ferocity of opinion that marked the Bork nomination hearings last September. Unless something entirely unexpected is raised during this week's testimony, Kennedy is expected to glide through to almost certain Senate confirmation next year.

"I have just boundless respect for Judge Kennedy," said John Oakley, a University of California at Davis law professor who identifies himself as a liberal Democrat."It is a dream almost too good to realize for someone who wants the court to remain in basically the same position."