Obama was in Oakland, California, to mark the fifth anniversary of My Brother's Keeper, an initiative he started after the 2012 shooting death of 17-year-old Trayvon Martin. The death of the African-American teen sparked protests over racial profiling.
The initiative was a call to communities to close opportunity gaps for minority boys, especially African-American, Latino and Native American boys, Obama said to roughly 100 boys attending the alliance's first national gathering. The My Brother's Keeper Alliance is part of the Obama Foundation.
"We had to be able to say to them, 'you matter, we care about you, we believe in you and we are going to make sure that you have the opportunities and chances to move forward just like everybody else'," Obama said.
Obama, who left office in 2017, was joined by basketball star Curry. The men spoke for about an hour, answering questions from the audience and joking around. They talked about lacking confidence or being aimless as teens.
Obama praised single mothers, including his own. He advised the boys to look for a mentor, and to find opportunities to guide others.
Curry joined the former president in praising the value of team-work.
"What we do on the court and the joy that comes out of that is second to none," he said, "because nothing great is done by yourself."
The former president cracked up the audience, and Curry, when asked a question about being a man. He said that being a man is about being a good person, someone who is responsible, reliable, hard-working and compassionate. Being a man, he said, is not about life as portrayed in some rap or hip-hop music.
"If you are very confident about your sexuality, you don't have to have eight women around you twerking," he said to applause. "'Cause I've got one woman who I'm very happy with. And she's a strong woman."