Neither, It's a seed.
The fruit of the coconut (Cocos nucifera) is technically a large, dry drupe (D) composed of a thin outer layer (exocarp), a thick, fibrous middle layer called a mesocarp (F), and a hard inner layer called an endocarp (E) that surrounds a large seed. The endocarp (A) contains three germination pores at one end, one of which the sprouting coconut palm grows through. The "meat" of the seed is endosperm tissue (B) and a small, cylindrical embryo is embedded in this nutritive tissue just opposite the functional germination pore. The seed is surrounded by an outer brown layer called the seed coat or testa. This is the brown material that adheres to the white "meat" or endosperm when it is removed from the endocarp shell. "Coconut water" (C) is multinucleate liquid endosperm that has not developed into solid tissue composed of cells. Copra comes from the meat of dried coconuts, while coir fibers are derived from the fibrous mesocarp