I want to use different methods in a class. But I know that only the main method will be read by the compiler. So how can I use other methods, objects and data in the main method? Can you give me a simple example?
I want to use different methods in a class. But I know that only
Share
Java compiler
javacwill compile all methods. JVM will start executing program frommain()method that can call other methods either from current class or other classes. For more information take a java tutorial (for example referenced by Sergeii or any other one).Have a pleasant time learning Java!