Hero stats from classes

I have a lot of classes yet unupgraded,
just to know, all stats gained from levelling up a class stack with the stats of other classes?
let’s say i have an archer to lv 20 with 15 atk points and a necromancer lv 20 with 10 atk, my hero will have 25 atk in total? or stats point only apply when i select the class as active?

Only apply the active class.