yes. Simillarly in the pacakge and import statements also .(dot) acts as a separator. And when we refer a member of a class like you mentioned. package myPack1.myPack2.myPack3; import java.util.*; regds maha anna
[This message has been edited by maha anna (edited March 19, 2000).]
Even if the . is considered an operator (and I think M.A. is correct that it isn't), I don't see how it is "overloaded" for Strings. Specific methods may be overloaded, but the . itself just what it always does for objects, right?
There are five language constructs in Java that sometimes considered operators and sometimes considered simply part of the basic language syntax... 1. object member access(.) 2. array element access() 3. method invocation (()) 4. object creation(new) 5. type conversion or casting(())
I did not try to imply that "." is overloaded for String, just that it sometimes is considered to be a special type of operator.
Sorry Jane - I didn't mean to imply that you had said otherwise; I just was going back to eram's original question. Off-topic alert: the following is not going to come up on an exam, so don't worry about it unless you're interested. I like Flanagan's Java in a Nutshell (at least, the earlier parts that aren't completely superfluous compared to the online API) but in this case I'm inclined to think the JLS outranks him. I wonder who exactly is using this alternate terminology? C/C++ programmers who haven't read the JLS perhaps? Or perhaps there are documents from Sun somewhere that perpetuate this usage - after all, Sun's JDK is written in C, and the people who made it could well have used C terminology when describing it, unaware that the JLS had amended it in this case. Oh well...