Wrote two functions, here is the first:
static void funcX (int xx) { x = xx; while (xx < 5) { System.out.print ("|"); } } And here is the second:
static void funcY (int yy) { y = yy; int result = funcX() * yy; System.out.println (result); } When you start both functions in turn, an incomprehensible (for me) error occurs:
/MyClass.java:39: error: cannot find symbol x = xx;
symbol: variable x location: class MyClass /MyClass.java:49: error: cannot find symbol y = yy;
symbol: variable y location: class MyClass / MyClass.java:51: error: method funcX in class MyClass; int result = funcX () * yy;
xandydeclared?int result = funcX() * yy;-funcXnothing. What do you multiply byyy? - IgorfuncXandfuncY; transfer their declaration to the class body. - Igor