The equation of states for a star is given by a polytropic equation, where density depends on the $n$th power of $\theta$. Please refer to the literature
First, what is this $\theta$? It can't be a constant for sure.
Second, for $n=0$, we get a solution for such a star, for which the density is constant throughout. Is this a practical solution? If we move radially outwards, the pressure at a point is proportional to the mass of the cylinder of unit cross section above it. So Pressure will always decrease with increasing radius, $r$. Then how is it possible that we can find a solution for a star with a constant density profile?