The double-barrelled gun was seized from a car driven by the 16-year-old defendant, a court hears.