Java: Why can't I call this method outside of main? [closed]
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Improve this question 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