Hey guys, i was solving a problem from an exercise and i did like this when declaring the variable.
double A, B, C;
A = sc.nextDouble();
B = sc.nextDouble();
C = sc.nextDouble();
double areaTriangulo, areaCirculo, areaTrapezio, areaQuadrado, areaRetangulo;
But in the solution the teacher did like this:
double A, B, C, triangulo, circulo, trapezio, quadrado, retangulo;
A = sc.nextDouble();
B = sc.nextDouble();
C = sc.nextDouble()
So i was thinking if my way of doing it is unecessary. I was thinking in making the code look clean. I'm still in early stages on Java so all the answers are really appreciate no matter how basic you may think the answer be.