How did they put the statue of liberty in the middle of the ocean?

It isn't in the middle of the ocean, it stands on an island which was originally called Bedloe's Island, but which is now known as Liberty Island.