As a beginner I wonder why my caller.VelocityC
only works when put inside of the main block?
When i have my code like this, I can't call the method.
Method calling class:
public class Velocity2 {
VelocityCounter caller = new VelocityCounter();
caller.VelocityC(6, 3);
}
Class containing the method:
public class VelocityCounter {
void VelocityC(int s, int v){
System.out.print(s/v);
}
}