04/13/2009 AT 05:10 PM EDT
How does a young celebrity avoid the pitfalls of Hollywood? Just ask Zac Efron
, who got some simple advice from fellow actor Leonardo DiCaprio
"He said, 'There's one way that you can really f--- this all up. Just do heroin,' " Efron, 21, tells GQ
in its May issue on newsstands April 21, recalling a courtside chat with DiCaprio, 34, at a Lakers game. " 'If you steer clear of that – the other obstacles you'll be able to navigate.' And that makes sense, dude."
The 17 Again
star doesn't do heroin but says he does enjoy a few drinks with friends – but only privately and "behind closed doors."
"I wasn't programmed by Disney," he tells the magazine about his decision to keep his private life out of the public eye. "It's common sense. If you're gonna be drunk with your friends, don't get wasted at the Chateau Marmont and hook up with some famous chick. It's not rocket science."
But Efron, who became a household name after starring in High School Musical
, knows he can't completely avoid the constant scrutiny. Case in point: a recent trip to Hawaii with girlfriend Vanessa Hudgens
. After photographs surfaced of the two attending his manager's wedding, some sites erroneously reported that they were instead getting married.
But that, Efron says, won't be happening for a while.
"I'm definitely not getting married. In this business, you're either getting married or they want you to be pregnant," he says. "I'm not getting married until I'm 40. If ever. The thought never crossed my mind."
Thinking about marriage again, Efron adds: "Maybe not 40. Maybe not until I'm 30."