Whales are mammals.
Why Whales Are Mammals
Whales breathe air using lungs and must surface to breathe. They give birth to live young, nurse their babies with milk, and are warm-blooded, maintaining a constant body temperature.
Although they live in the ocean and share some traits with fish, whales are fundamentally different and belong to the class Mammalia.