Fairly simple rule for any beginning C or Java programmer:
- never call "main" function from inside your source code
Ok here is what happens when you start any application no matter if it is console, windows, linux and etc..:
- OS always looks for "main" function and always calls it before any other function in the application, so it is the main function which calls all other functions, but you never should call main function from any other function in your application (although there are few exceptions to this rule).
I think you should study more about Object Oriented Programming including:
- difference between class and object, which methods and variables are inherited from class to objects, and which are not
- difference between static and non-static functions and variables
- why main method always have to be static and public and why it always have array of string as parameter
But I am still curious what was your reason for calling main function from asd?