The students, aged 13 to 17, came from schools inclucuding King Edward VII School, All Saints Catholic High School, Sheffield Park Academy, and Park Wood Academy, to fill courtroom 9 on Wednesday morning as part of the Inspiring Youth Award project run by South Yorkshire Police.
Judge David Dixon, who has championed the scheme, told the 25 youngsters: "You don't have to go to posh schools or Oxford or Cambridge - that used to be the case in the past.
"Even when I started I heard stories about people whose dad happened to be a judge and that's how they got in. But things are massively different now."
Solicitors, barristers, district judges and even a high court judge introduced themselves and spoke about their backgrounds and how they came to work in the law.
Naz Hussain QC, the son of a steelworker, said: "I wanted to be Batman when I was a kid but I couldn't so the next best thing is the job I do now.
"People told me I was naive and idealistic. You need to ignore those voices.
"Lots of the things you want to do are difficult and the chances of achieving them are low. Assess things and if it's what you want to do, you will have to put your head down. And I guarantee you will achieve something. Failures give you strength and teach you how to deal with adversity.
"You will encounter people who will be negative towards you. Don't allow them to put you off your stride. If I can stand here then anyone can do it."
Junior barrister Kate Riekstina, 27, told how she grew up in Latvia, learned English by watching the sitcom "Keeping up Appearance", and worked in prisons before joining the profession.
"I have worked for nine years to do this job," she said.
District judge Naomi Redhouse set up a law centre in Salford before she "got bitten by the bug of youth courts."
"There isn't one way to do anything," she explained.
Judge Rachael Harrison told the students how she gained disappointing A-levels at a Nottiingham comprehensive school.
"I watched LA Law and that inspired me to go and study law at Leicester polytechnic, " she said. "I decided to become a barrister and went to London, but I couldn't get pupilage - no one wanted me."
She sent out 200 handwritten applications all across the country and worked in a shop until she got a place in chambers in Sheffield in 1994.
Judge Dixon added: "One hundred years ago, Rachael wouldn't be here because she was a woman. One hundred years ago, no woman was allowed to travel abroad without their husband or father's permission.
"It doesn't matter what religion you have or what colour your skin is. What matters is that you work hard."
High court judge Mr Justice Nicklin previously worked in media law and advised A-listers like Madonna and Wayne Rooney about suing newspapers for publishing libellous stories.
He paid tribute to the district judges and lay benches who work in magistrates' court and deal with 95 per cent of the cases.
"Circuit judges do the majority of the serious crimes," he said. "I only come in occasionally and typically deal with homicide or other important cases."
The students quizzed the guests and were held spellbound by Judge Dixon's answers about the most difficult decisions he had made, cases which affected him emotionally at the start of his career, and some of the threats he received.
Special chief inspector Dave Turner organises the project which is run by a dedicated team of serving and retired police officers and volunteers all of whom have an interest in the personal development of young people.The project has been running since 2004 and leads to a qualification equivalent to a GCSE.
"We try and funnel them into whatever opportunities we have got," he said.
"They have shown throughout the year they have got what it takes. They fill in a workbook showing all the preparation they have done."
He said the original 25 will be whittled down to 12, and then six final contestants, who will act as the jury in a trial and see behind the scenes at the courthouse.
"The opportunities are brilliant," he said. "We go into schools and run coaching sessions and these kids will become mentors for the new ones.
"People come back six or seven years after they have been to university and got their careers going."
Neelam Sajid, 17, is "a prime example of this project," according to Special Constable Bobby Dev.
"Three years ago she was a naughty, naughty girl and now she is a potential barrister," he said.
"I used to mess about and never listened to teachers and I kept getting excluded," said the Sheffield Park Academy pupil, who passed the second level of the award in January.
She credits the scheme with giving her "much more confidence," adding: "I never thought I would be able to go into a courtroom."
Karol Selinski, 15, of All Saints, said: "Coming to this gave me an insight into what goes on in court and the paths you need to take."