FREMONT — They’d had the dress rehearsal the day before and the camera gear was all in place. Still, when you’re 17 years old and you’re about to interview the president of the United States, it’s hard to believe you’re not being had.

“It was extremely surreal,” said Kennedy High School senior Adam Clark, 17. “We all kept saying that we felt like we were going to get punked.”

Clark, four of his classmates and their teacher took part Monday afternoon in a virtual interview with President Barack Obama — the first ever.

Obama, sitting in the White House’s Roosevelt Room, connected with them over a live Google+ Hangout. And as the technician began attaching microphones to the Kennedy students in their classroom, the whole thing started to feel real.

“As soon as the president popped up on that screen, everyone was silent,” Clark said.

Clark asked Obama what his plan is to help students pay off their loans, one of five questions picked from among 225,000 submissions on topics ranging from online poker to the Occupy movement on the White House YouTube Channel, where the interview was streamed live.

“I think it sends a really important message to always try, you never know what’s going to happen, and that your opinion matters,” said Olivia Santillan, teacher of Kennedy’s advanced placement government and economics class. “I felt really proud of my students. I felt really proud to sit with them while they were having a once-in-a-lifetime experience.”

In addition to Clark and Santillan, Kennedy students Jordan Vo, Jessica Pleskach, Chin Yang Lui and Stacey Villegas were on camera for the interview.

The other participants were Christine Wolf, of Evanston, Ill.; Paras Patel, a University of Chicago student from Detroit; Jennifer Wedel, of Fort Worth, Texas; and Ramon Ray, of Montclair, N.J.

“At a time when Americans are struggling to pay for daily necessities, you’ve continued to push higher education for all Americans, but what is your plan to help students pay off all their student loans?” Clark asked the president.

“On the student loan program, we said let’s give the loans directly to students. We can take those billions of dollars and provide more help to students directly,” Obama said, adding that his administration also is urging Congress to act so interest rates on student loans don’t go up and to extend existing tax breaks for families. And, he said, he’s urging colleges and universities to try to make higher education affordable.

Clark, who hopes to study political science at an East Coast college, said the student loan issue has been on his mind a lot lately.

“I felt that he probably avoided the answer a little bit, that they don’t know exactly what direction they’re going to take on it,” he said.

Santillan, who has been teaching at Kennedy since 1997, said she asked her 38 students to write a question for the virtual interview, and that she chose Clark’s because it was well-written and timely.

“It made sense for a young person to ask that question,” she said. “It represented our doubts and our fears that we’ve been working through about facing the future.”

The post-State of the Union session was part of the White House focus on social media. In past such events — with Facebook, Twitter, LinkedIn and earlier YouTube sessions following previous State of the Union addresses — Obama answered questions that had been submitted via online networks. But Monday’s event allowed him to interact with a selection of his questioners, leading to more substantive exchanges as they pushed him on his stances.

Staff writer Josh Richman and the Associated Press contributed to this report.