Yes, that's how the concept of "dessert" was invented.
The body is constantly analyzing itself and it knows what vitamins and nutrients and all that good stuff it needs the most of, and which it needs less of. You'll have cravings for certain foods when your body needs something that it provides a lot of, and the body attempts a balance. So after a big meal of meat and mashed potatoes and carrots, the body will want some sugars. If you keep eating a lot of sugary junk food, you'll start to get cravings for hot nutritious foods, though taste preferences can still place bias in that area.