A high profile Melbourne lawyer has questioned the jail sentence given to a man who blew a bubble with his gum in court.

Magistrate Rodney Crisp sentenced 20-year-old Mirza Zukanovic to 30 days in jail for contempt of court at the Moorabbin Magistrates' Court yesterday.

He was later released on bail after his lawyer lodged an appeal in the Supreme Court.

Criminal lawyer Rob Stary says the jail term for such an offence is rare.

"I've never heard of any similar example," he said.

"Sometimes they're placed in the holding cells of the court until they come back and give an apology to the magistrate. That's usually for a matter of hours or so for someone to cool their heels and have an opportunity to reflect upon their indiscretion."

Mr Stary says the jail term would cost the taxpayers about $10,000 in prison management fees.

"If you fine the gentleman in question $10,000, that might deter any future behaviour," he said.

"But to imprison someone, especially a young person, you've got to exhaust every other option before you ultimately come to the conclusion that imprisonment is the only appropriate course."