I'm studying for a java programming exam, and I'm still a beginner. My problem in the if statement is:
int z;
if (z==1);
{//calculates area}
if (z==2)
{//calculates volume}
The goal is that if the user chooses 1 he'll find the area calculated and if he the user chooses 2 the volume will be calculated. However, in the output the area and volume are being calculated whatever the user chooses. Why is that?