Mohamed, Just when I thought I understood
Java a tiny bit, you've got me thinking again :- ) In the following example, I am calling static methods from a non-static method using an instance variable.
Before your post, I would have created non-static methods for staticMethods 1 and 2 and I would have instantiated objects for them in the main class before using their methods. But if I make them static, I can get away without creating objects for staticclasses 1 and 2.
What I am trying to understand is when to use instance methods and when to use static methods. If I can get away with static methods, then I don't have to create objects. I would sincerely appreciate your feedback. Thanks!