Hi All,
im trying to get an example to work on a main class passing variables to a class to then return the value.
This is the method for variables to be passed too
import java.lang.Math;
class CalcTest {
private int area;
public int getArea(int height, int width) {
return area;
}
}
the main class is
import java.lang.Math;
class CalcDrive {
public static void main(String[] arguments) {
CalcTest one = new CalcTest();
int b = 7;
int c = 12;
int a = getArea(b c);
System.out.println("the area is: " area);
}
}
Please can you advise as to where im going wrong, ive been stuck on the for hours now.
Thanks