In the last few years some/all (?) of the ships have gone cashless with a program called "Navy Cash." Usually you head to the disbursing office as part of your check-in and get something a lot like a debit-credit card. This is normally linked electronically to your checking account. Basically, you start by putting the card in the an Eagle Cash machine (looks like an ATM) and transferring balance onto it. (That transaction might take a day or two to settle, especially if the ship's internet connection is backed up... yes, internet, on the ship, on deployment...). Then you can use the balance on the card in the ship's store, coke machines on the ship, pay for your mess bill, etc., or anything that would have been otherwise a cash transaction onboard the ship (yes, anything). You can also transfer balance from your card to someone else' by using the machine. The cards even have a MasterCard feature so you can use them out in town. Last but not least, you choose a PIN when you first get your card. That is supposed to make cash theft almost impossible. It's a pretty well thought out program.
I also have a similar card called "Eagle Cash." I think that is the Army's or maybe AAFES equivalent. It doesn't have the MasterCard thingy or anything else like that so it only works in Eagle Cash machines.