BALTIMORE — Jesse Huang took a deep breath, holding his hands over his eyes. Then, too nervous to sit still, he jumped up and danced through a row of auditorium seats. Within the hour, hundreds of Johns Hopkins University students would be crowding in, filling all the seats, sitting in the aisles and leaning against the walls to watch him and his classmates take a shot at stand-up comedy.

Isaac Bernstein sat with his head down and his ear buds in, trying to stave off panic. A computer-science major was practicing his routine by talking into a Snapple bottle as though it were a mic, reciting poetry with a thick Irish brogue. A pre-med student paced at the front of the room, gesturing and muttering jokes about his dad who never learned to swim in India: You’re not drowning. The water’s only three feet deep. Stand up!

This is the 15th year Adam Ruben has brought stand-up comedy to campus. It’s the quintessential winter-session class at Johns Hopkins: For three weeks, students step away from the intensity of their academic majors, forget about their grade-point averages and take a class for the sheer joy of it.

The stakes are incredibly low — the grading is pass-fail, and most of the class time is spent listening to jokes. And yet for some, this class will present by far the most daunting challenge of their academic career: At the end of three weeks, each student will take the spotlight in front of hundreds, perhaps 1,000 people, grab the microphone and try to make the crowd laugh.

“This is scary,” said Charlie Linton, a senior. The very real possibility of absolute failure in the show swiftly forged a closeness in the class as they practiced. “We’re a bunch of Hopkins nerds who want to do well in this show,” he said.

They’re incredibly different from one another, with such a range of ethnicities, interests, personalities and reasons for being there that, yes, they suggest the setup for a joke, if they all were to walk into a bar.

Maybe because of that range, the class strikes deeply at some of the most difficult issues on college campuses today. While some professional comedians have said colleges can be too politically correct for stand-up shows, these students didn’t shy away from incendiary issues. Many of their jokes homed in on the kinds of identity issues that are both defining and polarizing. They took on religion, culture, sexuality, race.

Akshat Gupta, a student from India, talked about bumbling through American idioms, unsure of what people were really saying. A bipolar student made jokes about his diagnosis, a public-health major from New Mexico laughed about her overly demanding Asian mother, a senior revealed he had just changed his name and his gender.

The students have little in common except the intellect and work ethic that got them into Hopkins. Most say their friends would not describe them as funny.

“They say I’m very serious,” Bernstein said. “Too serious, sometimes.”

They had three weeks to prepare. Four minutes to be funny.

* * *

Ruben started the stand-up comedy class — teaching this perhaps unteachable thing, how to be funny — when he was a graduate student studying molecular biology at Hopkins.

“I think it’s essential,” he said of comedy. Even as a child, he found humor a particularly effective and memorable way to communicate ideas. Instead of writing book reports in elementary school, he made up videos or game shows to present in class. It was easier than talking to other kids at lunch.

Now, he’s on TV and writes books and a regular humor column for the journal Science. He does stand-up — when he’s not at work, most recently helping develop a vaccine for malaria. (Seriously.)

In class, Ruben shows clips of professional comedians and talks about the structure and mechanics of a successful routine. They analyze flops. Students answer questions designed to prompt thinking about possible material.

Then, they have to test their jokes.

“You show up and there’s a microphone in the middle of the room,” said Luke Sand, a former student who upended his academic major and his career path — which has included working for “Saturday Night Live” and writing for a TV series — after taking the class.

“To make 13 people laugh who are nervous about presenting their own work — it’s basically impossible,” Sand said. The idea of doing terribly in class is just about everyone’s worst nightmare at the school. But to do stand-up well requires the will to withstand an unresponsive crowd, the self-awareness to recognize when jokes aren’t working.

“An opportunity to fail,” Sand said, “is the most important thing.”

* * *

In the final week before the performance, Ruben told his students in his classroom, “There are 72 hours before the show.”

When some cried out in alarm, he pretended to be reassuring. “Well, 72 hours and 20 minutes.”

Most people tried to avoid Ruben’s gaze when he asked for volunteers to deliver their routines to their classmates.

Bernstein — who first signed up for the class as a freshman because one of his goals in college was to be less socially awkward — asked to go early, before stage fright destroyed him.

Many of his classmates’ hands were shaking as they reached for the mic.

Ruben had told them all to be supportive, and kind, to one another, but that the feedback should be 90 percent criticism and 10 percent praise. It’s the criticism, he said, that will help you improve.

“I think you’ve got about 75 percent of two different jokes, and you need to finish them,” Ruben told an economics major.

He checked the stopwatch on his phone after another routine and told the student it had taken five minutes and 30 seconds.

“I think you can cut everything you have down to two minutes. Be ruthless.”

He noted that white people and pre-meds were themes for jokes this year. He encouraged a student to amplify her chipmunk noises when she was describing a particularly large gathering of chipmunks.

He doesn’t tell them to avoid sensitive topics or language, just lets them know the risks — offending people, distracting attention from the joke.

Most of all, he repeated the advice he gave to Linton: “A lot of these jokes, bring it down to one line. Be brutal.”

The last student reluctantly crept to the front of the room, put his black Moleskine notebook on the table, pulled the mic off the stand. It was Huang, a freshman biophysics major from Chicago.

“Being Asian is weird, regardless of what type you are,” he said.

Sixty-eight hours to go.

* * *

On Friday night — THE Friday night — as his class was melting down in the final minutes before the show, Ruben reminded them to hold the mic close, to look at the audience, to stay near the front.

“Have fun,” he told them, then said it into the mic in an amplified, stand-up-comedian voice that made them laugh: “Have fun.”

Four classmates hugged. Huang hopped up and down. A sophomore from Texas changed from sneakers into strappy heels.

A few minutes after 8, the lights dimmed in the packed auditorium. Ruben introduced the show with some jokes, making fun of the school’s intimidating mascot, a blue jay: Watch out, we might tip our heads to the side and chirp pleasantly.

Bernstein, who found the class so valuable as a freshman that he returned this year as a teaching assistant, took on fraternity parties at Hopkins, where people are even competitive about beer pong. He pretended to quickly scrawl, on the blackboard behind him, a formula for the optimal parabolic trajectory of the ball.

Linton told the crowd he was a senior, transgender and had just fully come out over winter break. He described people on the liberal campus apologizing excessively when they assumed he was a woman and said people are so supportive that if he complained about waiting in line in the bagel shop by calling it transphobic, at least one person would nervously agree with him.

The crowd was applauding loudly, laughing, as he stepped out of the light with a flushed face. His classmates stretched out hands to give him high-fives.

There were jokes that didn’t land — especially some that were graphic.

There were cringes.

There were moments when the crowd went quiet. Oppressively quiet.

But more often, the audience seemed delighted to laugh at things they don’t usually laugh at.

Like Jared Dallas’s intro. He strode onto the stage area and yelled, “Hi! I am an Orthodox Jew!” He pumped his arms in the air. “Yeah!”

When a math major acted out a manic episode, with the voice in his head pumping him up to go to another city . . . by foot . . . the audience laughed and applauded loudly.

Usman Enam, a molecular biology major from Pakistan, said, “I’m brown.” Pause. “I’m Muslim.” Pause. “I culturally identify as a terrorist.” The crowd cracked up.

Morgan Ome made fun of her first trip to the counseling center, with its emoji pillows, to ask about handling stress, and her anxious fumbling for the Hopkins-perfect answer when the counselor asked, “Which parts of your identity would you like to bring forward today?”

When Akshat Gupta described what it’s like to come here from India and try to communicate with Americans, the crowd was laughing so hard that by the time he asked if they’d been to Walmart, they burst into expectant applause.

Comedy is an abstract art form, Bernstein said, driven by whatever the audience at the moment happens to find funny. That could be some mix of culture, personality, the vibe in the room, the news cycle, who knows. “Like dark humor,” he said. “One person will laugh. Another will slap you.” But few art forms offer such a direct connection with the audience. A ballerina can land a perfect grand jeté without hearing more than the soft thump of toe shoes on the stage, but a comedian will face pure delight — or hostility.

At the end of the show, Ruben summoned his students back to the spotlight, and they held one another close, beaming, as the crowd cheered.

“We did it!” Huang said, with disbelief. Gupta who is here to pursue graduate studies in physics and had never heard of stand-up comedy until two years ago — was euphoric: He has found a way to bypass the idioms, the customs, the differences, an entirely new way to communicate ideas.

It was — yes — ridiculous. And, for a moment at least, everyone was laughing.