A teenager has appeared in court accused of committing a sex act in a children’s playground.