Timothy Miller, who is also 18, and of Glanmire Lodge, Glanmire in Cork, appeared before the district court in the city.

Detective Garda Dermot Broughton gave evidence of arresting Mr Miller and putting the murder charge to him.

Judge David Waters remanded the accused in custody to appear in court again on 25 November.

Mr McSweeney died after he was stabbed at Kent Station, on Lower Glanmire Road, on Tuesday afternoon.

He had been involved in an exchange with another group of teenagers when he suffered the fatal injury.

He was from Hazelwood Grove in Glanmire.

A boy in his mid teens, who was also arrested in relation to the investigation, has been released without charge.

Gardaí said that a file will be prepared for the National Juvenile Office and the Director of Public Prosecutions.