“You know, I never count any chickens before they hatch,” Mrs. Clinton told reporters after stopping in for a bubble tea at Kung-Fu Tea at the Queens Crossing’s food court in Flushing, when asked if a big victory on Tuesday would mean that she had locked up the nomination. “I’m not taking anybody or anything for granted.”

And Mr. Sanders showed no signs of easing up either. The Vermont senator spent most of the sunny Monday face-to-face campaigning, an unexpected shift for a candidate who has spent most of his days holding mega-rallies before thousands of supporters. Mr. Sanders shook hands on sidewalks across the city, visited a public housing complex in the Bronx, hosted a round table with local community leaders, and stopped to eat a B.L.T. sandwich in Queens. He also hit the streets, walking 14 blocks through Midtown and speaking to striking Verizon workers.

“I just want to say a word to thank all of you for the courage to stand up for justice and against corporate greed,” Mr. Sanders said through a megaphone as the strikers chanted his name. “We will not tolerate large profitable corporations sending jobs to low-wage countries, throwing American workers out on the street, cutting back on health care benefits, and then paying their C.E.O. $18 million a year.”

As Mr. Sanders courted union workers, Mr. Trump was across town trying to improve his standing with members of minority groups.