Although you were a minor, the judge has discretion to determine whether or not you should be tried as an adult.  If you were tried as an adult and convicted, you are then sentenced as an adult.There are many factors why a minor might be tried as an adult, such as commission of a felony, prior criminal record, and your age.  If you are close to 18 and committed a felony, the judge might decide you should be tried as an adult and given an adult sentence.