Awarding the sentences, Judge Liz Gaynor said both young men were "on the edge of a slippery slope leading into the dark pit of Port Phillip prison".
According to Herald Sun, Julius Medina and Peter Salapura -- both 19-year-old -- had avoided jail sentencing.
Judge Gaynor sentenced Medina to three years detention in a youth justice centre and Salapura was sentenced to perform 624 hours of unpaid community work as part of an intensive corrections order.
Gaynor said the term "Punji hunting" was appalling and degrading while stressing that the attacks were not motivated by a hatred of Indians. They were chosen because they were "soft targets". The court noticed that the duo terrorised their victims in a four-day spree of random street attacks in December last year.
Medina attacked six Indians, confronting three of them with an imitation handgun and another with a knife while Salapura was involved in two robberies where he punched two Indian men, the report said.
The county court heard it was a gang of six who drove around St Albans and Taylors Lakes suburbs in Melbourne hunting for victims. Victims were robbed of their wallets and mobile phones, and few were punched and beaten with a metal bar.
However, the two accused were not charged for injuring the victims, it noted.
Medina pleaded guilty to three counts of attempted armed robbery, two counts of robbery and one count of armed robbery. Salapura pleaded guilty to two counts of robbery.
The judge said Medina had a terrible criminal history despite having the ongoing love and support of his parents.
"You somehow think you are a superman who can do anything he likes and nothing will happen to him and that the only way to deal with you is to hand out the consequence of a stretch in adult jail," she said.
The judge said she took into account Salapura's traumatic childhood and his smaller role in the robberies.
Three other boys pleaded guilty in the children's court, charges against another youth were discharged and an 18-year-old is awaiting trial at the county court in August next year.
The verdict comes a day after a Victorian court on Thursday sentenced a teenager, who had witnessed the stabbing to death of Indian student Nitin Garg in Melbourne, to probation for 18 months.
The 16-year-old was named for legal reasons and had pleaded guilty in the Australian Supreme Court to being an accessory to the murder of Garg that took place on January 2 this year.