Hi all, I hope you are well. I am trying to explain some code to a friend :
StringConcatenate StringConcatenate1 = new StringConcatenate(); StringConcatenate1.stringConcat();
I said that this code creates an object "StringConcatenate1 " of type StringConcatenate and executes method stringConcat() (which is from class StringConcatenate()) on object StringConcatenate1. Is this correct ? What I am trying to do here is call another class from within a different class (all in same package). Been a while since I have done Java so please excuse the simple question lol. I also said to him that we can just call the method from that class using a class reference and without creating an object like so :
Is my thinking correct here? And is there a more elegant way to call a method in another class? Oh, and is there a convention for naming objects and is StringConcatenate1 an acceptable name?