In this June 1, 2016, photo, Supreme Court Justices Ruth Bader Ginsburg, left, and Sonia Sotomayor discuss the food traditions of the Supreme Court at the Smithsonian Museum of American History in Washington. (Cliff Owen/AP)

NEW YORK — Supreme Court Justice Sonia Sotomayor is not, as her colleague Justice Ruth Bader Ginsburg likes to point out, “a shrinking violet.” But Sotomayor paused for a long time Tuesday night when television newsman Charlie Rose asked whether changing societal attitudes led to the Supreme Court’s 2015 decision finding a constitutional protection for gay couples to marry.

“I’m wondering whether I should answer at all,” Sotomayor finally said. She looked at the diminutive Ginsburg, who was sitting with her onstage at the New York City Bar Association.

“She gets more cover than I do,” Sotomayor said to laughter, passing off the question. Sotomayor quickly added: “She’s earned it.”

Responded the 83-year-old Ginsburg, beginning her 24th term on the court: “It’s only because I’m old enough to be her mother.”

The two New Yorkers returned to a rousing welcome at the bar association’s historic home a couple of blocks from Times Square; the crowd packed the high-ceilinged meeting room, where a portrait of Ginsburg hangs, and spilled over to another where the crowd watched on closed-circuit television.

There was something of a “Ginsburg-watch” feel to the evening. With the death of her friend Justice Antonin Scalia earlier this year, Ginsburg has become the member of the court most likely to cause controversy off the bench.

Earlier this summer, she criticized Republican presidential nominee Donald Trump in media interviews she later came to regret; she said she shouldn’t have commented on politics. More recently, she walked back an off-the-cuff criticism of San Francisco quarterback Colin Kaepernick’s silent protest of the national anthem.

Rose tried to protect both justices from an audience member who wanted to know how they felt about what the questioner said was the imminent election of the nation’s first female president, Democrat Hillary Clinton.

Ginsburg eventually told the persistent man that the United States would not be leading the way in choosing a woman. Sotomayor warned that the public sometimes expects a president to be able to fix all of the nation’s ills. “No one can wave a magic wand and fix problems,” she said.

They also danced around a question about whether Senate Republicans — who have blocked consideration of President Obama’s nominee Judge Merrick Garland to replace Scalia — might relent in a lame-duck session if Clinton is elected.

“Eight is not a good number,” Ginsburg said, referring to the current makeup of the court. Added Sotomayor, diplomatically, “I think we hope there will be nine as quickly as possible.”

Ginsburg drew laughter when she was asked whether the Supreme Court was the “best-functioning” branch of government. Compared to the legislative branch? Ginsburg wondered. “No question.”

Ginsburg and Sotomayor almost always agree on the court, but are not known to be the closest of companions on the court. They are different not only in age — Sotomayor is 62 — but temperament; Sotomayor said recently that Ginsburg is opera, while she is jazz.

They seemed to have a minor disagreement about the importance of experience in preparing someone for the court.

Sotomayor lamented that she is the only justice who served as a district judge, presiding over trials, setting disputes among the parties, being on the ground level of the cases that eventually find their way to the Supreme Court.

Ginsburg noted that she clerked for a district judge 55 years ago. But lawyers know just as much about what goes into building a record for a case as trial judges do, she said.

“We have a debate!” Rose cried.

But even Rose noted that the night was supposed to be one of “stories,” not jurisprudence.

Sotomayor said she was fulfilling the dreams of her mother, who arrived in New York from Puerto Rico and wanted to be like the “college girls” she saw. “I’ve lived all of her dreams, because she set the example for me,” said Sotomayor, who went to Princeton and then Yale Law School.

Celina Sotomayor wanted her daughter to be a journalist, the justice said, although she now acknowledges that the law career worked out.

For her part, Ginsburg repeated a story she told an author for a book about the Jewish justices: “What’s the difference between a bookkeeper in the garment district and a Supreme Court justice? One generation.” Celia Bader also did not attend college; she supported her brother, who went instead.

Ginsburg said female judges were only a curiosity until President Jimmy Carter set out to transform the federal judiciary. President Ronald Reagan continued the effort by choosing the first female Supreme Court justice, Sandra Day O’Connor.

Sotomayor recalled the day Justice Elena Kagan was sworn in, for the first time giving the court three female justices. Obama made his way to Ginsburg, “and said something like, ‘Are you happy with the two sisters I brought you?’ ” Ginsburg replied that she was, Sotomayor said, but added “I’ll be happier when there are five.”

Ginsburg said she has amended her answer, when asked when there will be enough women on the court. “When there are nine,” she says.