Exact solutions to the Dirac equations with a time-dependent mass and a static magnetic field or a time-dependent linear potential are given. Matrix elements of the coordinate, momentum and velocity operator are calculated. In the large quantum number limit, these matrix elements give the classical solution.