First I would like to say I'm really happy I joined this forums, it's gonna help me a lot during my study of Java. I just started with Java and I think I got most of the basics, I know what classes are, objects, instances, methods, arguments, etc. And I also know a little about some of the functions in java such as, for & while loops, if statement, switch statement, using some pre-made classes such as JOptionPane and Scanner and some other stuff.
Anyhow, currently I'm having hard time understanding how to invoke a method correctly, either within the same class or from a different class, and what is the difference between these tow processes ?
Let's say I have tow classes, Class1 & Class2 as the following :
And
Ok, my questions are :
1- I'm I calling the methods within the same Class and from the other classes correctly ?
2- Do I have to create a new object every time I'm calling a method ? should it be 1 new object per class or 1 new object per call for a method ?
3- How exactly can I involve the parameters (arguments) and make them part of the method ? ( if you could include a simple mathematical example it would be great ).
4- What do you think about my code ? is it up to Java standard ? clean and easy to read ?
5- Any other notes, observations or advice ?
Sorry if some of my questions are stupid or what so ever, I'm on the beginning of the road, so bare with me : )
Any help is appreciated guys, so thanks in advance .
RegardS,