Image Source || Owner || License CC0
Tasting
So, you taste your food with your tounge. The science of it is that we are able to distinguish tastes of food ( or not food ) by our numerous taste buds. Now look at a butterfly see any tounge?
Now butterflies needs to know the taste of nectar as they need it for survival. Notice the sensors on their legs? That's what they use to taste the nectars and not only that, they also check if they can lay their eggs on it.
Image Source || Owner || License CC0
Eating
So the next question is how do they eat if they dont have tounge to help push food? They cant chew or bite food, since they dont have a mouth with teeth and tounge like ours
Its actually thru what they call "proboscis" if you've studied mosquitoes in gradeschool yeah its similar to that, what it does is it lets butterfflies insert liquids like nectar and thru that they can eat. You know whats cute? They can actually curl it like a hose or a whip rolled like Indiana jones.
beautiful butterfly