In a place in the cosmos from all gravitational and frictional influences, when you throw a rock, the rock will just float. If the rock is far from any object in space, it will not be attracted to it due to gravitational attraction. This is because in space, there is an absence of gravity.