Not breastfeeding

Not wanting to exclusively breastfeed for my own reasons but can I still breast feed while I’m in the hospital so baby gets the colostrum?