You should not drink the salt water if you are stranded on a desert island. Ocean water consists of a higher concentration of salt than your cells. So your cells would not be able to handle the high salt concentrations. Drinking the salt water would make you more dehydrated.
Your cells would lose water in a solution with a higher concentration of salt and would cause them to shrivel. You would be better off eating foods that contain lots of water like watermelon, strawberries, cucumbers, peaches.
If the island you are stranded on has palms or coconut trees, you will have access to fresh water. If you do not have these, then you can make a solar-still out of items into to distill water.