Which is the first method called when Java executes a program? -


i learning core java , have 1 question, "which first method called when program executed?"

in addition aioobes answer

a usual way start simple java program execute java this:

java com.example.myclass 

com.example.myclass (or qualified class name) needs have main method signature:

public static void main(string[] args) 

(you're allowed change name of parameter, arguments instead of args). virtual machine try load named class , try invoke static method "start java program".


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -