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?

18th Sep 2020, 3:35 PM
Preethi
Preethi - avatar
3 ответов
+ 2
With the help of instantiating an object of the other class https://code.sololearn.com/chnN37U05Dyf/?ref=app
18th Sep 2020, 3:43 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
18th Sep 2020, 3:44 PM
Aleksandrs
Aleksandrs - avatar
0
Ok thanks!
18th Sep 2020, 4:06 PM
Preethi
Preethi - avatar