+ 1
Java OOP doubt?
If I have class named wheels then how can I call 4 different methods from wheels class to the main class with an array list (collection) as four different object.
2 Respostas
+ 2
Here's an example on how to call methods from a class in the main class.
https://code.sololearn.com/c9Febn4nC2Ux/?ref=app
+ 1
you could also use interfaces if you wish to run different code every time a method is called.
https://code.sololearn.com/cWgLCkjFySW5/?ref=app