return a value from a class
in
Programming Questions
•
8 months ago
A basic question but i don't know it.
the example is simple:
Car myCar;
void setup() {
size(300, 300);
myCar = new Car();
}
void draw() {
myCar.test();
println(test);
}
class Car {
int test() {
background(0);
return 180;
}
}
do yoy know how i could return my value outside of my class?
thanks in advance :)
1