Miley Cyrus had some tips for troubled pop star Justin Bieber, and shared them with Jay Leno on "The Tonight Show" on Thursday.

Miley Cyrus has been 21 for all of two months now, give or take, but she's already something of a senior statesman, apparently giving advice to a pal, 19-year-old Justin Bieber.

"I would just say, you know what, you've got a lot of money. Pay people to make sure you don't get in trouble," she sagely told Jay Leno on Thursday's "The Tonight Show." "And party at your house. Buy a house, and add a club to it."

From what the neighbors have said, we think he's already following through on the second part, with lousy results, but the first part sounds pretty common sense.

PHOTOS: Miley Cyrus before and after Disney

"You know it's funny," Cyrus said, "'cause today, I was looking, my fans put all these people's mug shots up and they were like, 'I don't see a Miley mug shot yet.'"

What's her secret to keeping the world free of such an image? Well, she stays on the right side of the legal line.

"I get the most flak of anybody ... [but] I'm not doing anything illegal. I'm doing a lot of ... but I'm not doing anything illegal.

"... Everything I do is legal in California."

Though some things -- like her VMAs naked-chicken-butt wedgie, for example -- maybe shouldn't be.

ALSO:

Kristen Bell, Dax Shepard urge boycott on celebrity kid photos

Model Christie Brinkley celebrates 60 posing in a sexy swimsuit

Scarlett Johansson-Oxfam partnership fizzles amid SodaStream tiff

Follow Christie D'Zurilla on Twitter and Google+. Follow the Ministry of Gossip on Twitter @LATcelebs and on Facebook facebook.com/ministryofgossip.