Yes, it is both.
Are water chestnuts considered a vegetable? Sweet potatoes? Coconut? Pumpkin? Asparagus?
The answer to this question is “yes”. The botanical definition of what is or isn’t a fruit or vegetable is fairly ambiguous and open to inconclusive debate. But in general usage (especially among Americans), the distinction between fruits and vegetables hinges more on how they are used than their botanical classification. Fruit typically refers to that which’s edible (including seeds) while vegetables refers for the most part to that which’s not consumed raw (although some raw vegetables like cucumbers can be eaten)…