However, astronomers can find black holes and neutron stars by observing the gravitational effects on other objects nearby.
Astronomers can discover some black holes and neutron stars because they are sources of x-rays.
The intense gravity from a black hole or a neutron star will pull in dust particles from a surrounding cloud of dust or a nearby star. As the particles speed up and heat up, they emit x-rays. So the x-rays don't come directly from the black hole or neutron star, but from its effect on the dust around it. Rotating stars Many stars rotate around each other, much as the planets orbit our Sun. When astronomers see a star circling around something, but they cannot see what that something is, they suspect a black hole or a neutron star.