Eva Longoria went back for her master's degree after a successful run on "Desperate Housewives."

There's a routine that nearly every high school senior goes through: apply to college, wait an ungodly amount of time, then find out which university you're going to ship yourself off to at the end of summer. For most, college is a transition period for early 20-somethings to learn more about themselves and what they want to do with the rest of their lives. However, for a lot of teen stars — whose careers seem set before they reach legal adulthood — things like college are put on the back burner to pursue other endeavors.

And while a lot of celebrities usually opt out of university to focus on their work, there are some stars who choose to press pause on their burgeoning careers in pursuit of a higher education. Take a look at 11 celebrities who went to college after they already famous, ahead.

1/

Ariel Winter

After making a name for herself as one of the Dunphy children on the Emmy-winning comedy "Modern Family," Ariel Winter was accepted into the University of California, Los Angeles in 2016. However, after scheduling conflicts, the actress was forced to defer for a year and is expected to begin her freshman year this fall as a political science major with dreams of becoming a lawyer. Winter's "Modern Family" co-star Nolan Gould also joked about "sibling" rivalry, considering he was recently accepted to UCLA's opposing school, University of Southern California.

2/

America Ferrera

Getty

Not too long after starting her freshman year at University of Southern California, America Ferrera was offered the lead role in "Ugly Betty." After a conversation with her professor, who advised her to take the job and come back to finish her degree later, America — who had already starred on "The Sisterhood of the Traveling Pants"— dropped out of USC to begin her television career. She returned to USC in 2008 and graduated with a bachelor's degree in international relations in 2013, 10 years after she initially began.

3/

Dakota Fanning

Dimitrios Kambouris/Getty Images

Dakota Fanning was already a household name, with critically acclaimed hits like "I Am Sam" and "Uptown Girls," by the time she decided to take a break from her acting career to attend New York University in 2011. There, Fanning attended the Gallatin School of Individualized Study, where she majored in women's studies, with a focus on women in film and culture. She graduated in 2014.

4/

Dylan and Cole Sprouse

Donald Bowers/Getty Images

As preteens, Dylan and Cole Sprouse became Disney Channel icons when they broke out on "The Suite Life of Zack & Cody" in 2005. After the show ended in 2008, the twins dabbled in a spin-off, "The Suite Life on Deck," before taking a break from acting in 2011 to enroll in New York University. The brothers both attended the Gallatin School of Individualized Study, where Dylan pursued video game design while Cole focused on humanity and archaeology. They graduated in May 2015, pulling a prank on the school's deans by accepting each other's diplomas. Currently, Cole is starring on "Riverdale," while Dylan is revving up for his first acting role in years in the indie film "Carte Blanche."

5/

Emma Watson

Pascal Le Segretain/Getty Images

Emma Watson had five "Harry Potter" films under her belt by the time she enrolled at Brown University in 2009. Though the actress dropped out for a time, she eventually returned and graduated with a bachelor's degree in English literature in 2014.

6/

Eva Longoria

Jerod Harris/Getty Images

A year after finishing her run as Gabrielle Solis in "Desperate Housewives" in 2012, Eva Longoria walked across the stage at California State University Northridge, where she earned a master's degree in Chicano and Chicana studies. Longoria, who also had a lengthy career on soaps like "General Hospital" and "The Young and the Restless" before enrolling at Northridge, completed a thesis titled, "Success STEMs From Diversity: The Value of Latinas in STEM Careers" as part of her degree. (Hell to the yas.)

7/

James Franco

James Franco had already starred in two "Spider-Man" films by the time he finished his bachelor's degree in English at University of California, Los Angeles in 2006. But his academic career didn't end there. While working on films like "Pineapple Express" and "Milk," the actor attended Columbia University's MFA writing program, New York University's Tisch School of Arts for filmmaking, Brooklyn College for fiction writing, and an MFA poetry program at North Carolina's Warren Wilson college. Did we mention he was also a Ph.D. student in English at Yale? Along with a lengthy film career, Franco also has an impressive track record as a student.

8/

Jodie Foster

Mark Metcalfe/Getty Images

Jodie Foster had already solidified herself as a child star and starred alongside A-listers like Robert DeNiro in "Taxi Driver" by the time she attended Yale University 1981. After a few scary incidents, like a stalker in her first years in college, the actress graduated — magna cum laude, we might add — in 1985 with a bachelor's degree in literature. She wrote her thesis on poet Toni Morrison.

9/

Miranda Cosgrove

By the time Miranda Cosgrove enrolled in University of Southern California in 2012, she had already become a staple on Nickelodeon with shows like "iCarly" (in which she played the lead character) and "Drake and Josh." Cosgrove, who is currently studying film at USC, was homeschooled since the sixth grade, so we can imagine attending a university is a huge change for her.

10/

Natalie Portman

Getty

Despite becoming a household face as Padme Amidala in "Star Wars: Episode II: Attack of the Clones," Natalie Portman opted to press pause on her film career to pursue degrees in psychology and neuroscience at Harvard University. The actress, who graduated in 2003, has been called "down-to-earth" by her classmates, and even spent time living in the dorms, though with heightened security.

11/

Yara Shahidi

Maury Phillips/Getty Images

In 2014, Yara Shahidi went from child star to Teen Choice Award-nominated actress when she broke out as Zoey Johnson, Anthony Anderson's 14-year-old daughter, on ABC's "Black-ish." With that fame, Shahidi has been able to launch her own spin-off, "Grown-ish" on ABC's sister network, Freeform. And while she has a busy few years ahead of her, Shahidi, who is now 17, will also prioritize college. In June, she announced that she will attend Harvard University.