In June 2014, the teen had sexual intercourse and oral sex in a nearby wooded area.
Garda Ashling Murphy told Judge Donagh McDonagh the girl told someone in a youth education programme the next day what happened and gardaí were alerted.
The 17-year-old boy was interviewed shortly afterwards and admitted having sex with the 15-year-old girl.
Defence barrister Dermot Sheehan said: “They were both living in the same place under the care of the HSE as both of them were placed in the same house. He was there for three years. The injured party was there for four weeks.
“It happened on a June evening when both of them had returned to their accommodation and both of them left the house and went somewhere nearby.
“He co-operated when interviewed and he accepted what occurred and I think the admission would have been some comfort to the injured party.”
Judge McDonagh said: “The probation report says there was no form of coercion. If that is true, this was two teenagers getting up to what they should not be getting up to.”
However, Garda Murphy said: “No, the injured party says it was not consensual.” The judge remarked that, one way or another, it was defilement but there were degrees of defilement.
Judge McDonagh said the probation report stated that the boy was keen to meet certain educational targets in his life. Sentencing was adjourned for nine months for a progress report on these issues, and Judge McDonagh if there was evidence at that point that the accused was taking positive steps with his life then a more lenient approach to sentencing would be taken.