0
How the static main() method can access the another method in another class which is not declared as static?
In java , a static method can always access the another method which is declared as static...but the main() method which is usully declared as static will access the other methods which are not declared as static in another class.how?
3 ответов
+ 2
With the help of instantiating an object of the other class
https://code.sololearn.com/chnN37U05Dyf/?ref=app
+ 1
Through the class instance.
https://code.sololearn.com/cf4KnlDXSKZb/?ref=app
0
Ok thanks!