Hey, I've finally almost finished my Java class at school and I've started going off on my own trying to learn how to program various things. I'm currently trying to find out how to run a specific method of a class from another class. I attempted to look up how to do this but I must be searching with the wrong terms or something.
Example:
-I open up the cmd and start up First.class
-Somewhere in First.class it may need to run a method from Second.class, maybe to do a calculation or something. (This is probably a bad example...)
How would I go about running a specific method from Second.class through First.class?
Another question that I just thought of while typing up the above question is; Can I, if the above question is possible to do, move varibles and their values from one class to another and how would I go about doing that?
Thanks in advance for any help, tutorial links are also welcome!