A TEENAGER was seen waving a knife on a Dublin street to show another man "how you would slash somebody with it" while undercover gardai watched, a court heard.
Aaron O'Donoghue (19) threw the knife into the Liffey when he realised that the officers were approaching.
In another incident, he was arrested following complaints that he was wandering topless on the quays, randomly hitting passers-by.
Dublin District Court heard O'Donoghue was "running wild" in the city centre after leaving the family home.
Judge Michael Walsh adjourned the case against him for the production of a pre-sentence probation report.
The accused, with an address at Clonree, Ashbourne, Co Meath pleaded guilty to possession of a weapon at Bachelor's Walk on April 15. He also admitted separate charges of having a weapon at Temple Bar Square on May 5 and causing a breach of the peace at Aston Quay on May 2.
Sgt Sheryl Woulfe told the court gardai on plainclothes duty at Bachelor's Walk saw the defendant walking towards them with another male at 8.45pm.
He was holding a large knife and waving it around in an aggressive manner, "showing the other male how you would slash somebody with it."
The court heard he was making the slashing motion across the front of his body. When he realised the gardai were approaching, he threw the knife into the river Liffey.
In the Temple Bar incident, he was stopped at 10.25am and consented to being searched. Gardai found a knife on him and arrested him.
The third incident happened at 9.45pm. Gardai were dealing with a separate incident when it was reported to them that a topless male was walking down the quays, randomly hitting members of the public.
When gardai arrived, they saw O'Donoghue shouting at a bus driver. He could give no reason for his behaviour and was arrested.
The court heard O'Donoghue had just one previous conviction, for cycling past a red light. The accused had left the family home a year ago and came into the city centre where he "appears to be running wild," his solicitor Michael Kelleher said.
There was now support for the accused and a member of Focus Ireland was in court.
Adjourning the case, Judge Michael Walsh said he wanted to see a "comprehensive report."