Maybe the Nets just needed to get healthy.

Playing with their full starting lineup healthy for the first time in nearly a month, the Nets put together one of their finest performances of the season, coming away with a 104-96 victory over the Celtics in front of 15,738 inside Barclays Center Tuesday night.

The win gave the $100 million Nets, now 7-14, their first winning streak of the season, and a sense of hope they might finally be getting things turned around now that they are beginning to get everyone on the floor together.

“You have to be optimistic, man. November was a [expletive] year for us,” Kevin Garnett said, before laughing and catching himself. “A [expletive] month.

“November was hard on us, as it would be for any other ball club or any other team in the league. But I feel like we’re making some strides. You can actually see the improvement in our team. Obviously it’s only two games … but we’re trying to build on the momentum that we have, and continue to play good basketball.”

Although Paul Pierce — who returned to the lineup much quicker than expected after breaking a bone in his right hand on Nov. 29 — came off the bench, it was the first time the Nets had their projected starting lineup of Pierce, Garnett, Deron Williams, Joe Johnson, and Brook Lopez playing in the same game since their 100-98 overtime victory in Phoenix on Nov. 15.

Since Williams and Brook Lopez went down with sprained left ankles in that game, the Nets have struggled mightily, dropping nine of their last 12 games, with Williams missing all but one of them and Lopez sitting out seven. But Williams made his return against the Celtics, his first game action since aggravating the sprained ankle in his initial return to the lineup on Nov. 20 in Charlotte. After a slow start, he looked quite good, slicing and dicing his way through the Celtics defense for 25 points and seven assists while playing almost 37 minutes.

“I wasn’t sure [how I’d look],” Williams said. “I only had one practice, and the ankle was a little sore, a little tender, but I felt I needed to play because we don’t have many practices and I felt good enough to play, but I wasn’t really sure. So I was a little surprised.”

He also was surprised he played so many minutes, including the final 9:44 of the game.