The peculiarities of electric current in semiconductors with nonuniform distribution of charge carriers are studied. The semiclassical drift-diffusion equations consisting of the continuity equations and the Poisson equation are solved numerically using Rusanov finite-difference scheme of third order. The different types of boundary conditions are numerically investigated. It is shown that the stability of the Rusanov scheme for the problem considered is achieved with the Neumann type boundary conditions. These conditions correspond to the absence of diffusion through semiconductor surface. Special set of parameters is found under which a very interesting and unusual transient effect of negative current in nonuniform semiconductors appears. Different regimes of negative current are considered for realistic semiconductor materials.