title: Is the '.' for member access considered an operator in Java?
body: <p>In Java, I can access a public member of a class using <code>.</code> as can be seen in the second line of the main method in the following example (for the sake of this example, ignore my poor use of encapsulation).</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          Position p = new Position(0,0);
          int a = p.x; // example of member access
      }
  }
  
  class Position {
      public int x;
      public int y;
  
      public Position(int x, int y) {
          this.x = x;
          this.y = y;
      }
  }
  </code></pre>
  
  <p>Is the <code>.</code> considered an operator in the Java programming language, just as <code>*</code>, <code>~</code>, and <code>!=</code> are considered operators?</p>
  
  <hr>
  
  <p><strong>Edit</strong> - Extending the above example:</p>
  
  <p>As has been pointed out, it seems that the Java language specification considers <code>.</code> to be a separator and not an operator. Yet, I would like to point out that <code>.</code> exhibits some behavior that does seem rather operator-ish. Consider the above example extended to the following:</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          Position p = new Position(0,0);
          int a = p . x; // a -&gt; 0
          int x = 1;
          int b = p . x + x; // b -&gt; 1
      }
  }
  
  class Position {
      public int x;
      public int y;
  
      public Position(int x, int y) {
          this.x = x;
          this.y = y;
      }
  }
  </code></pre>
  
  <p>It is clear that some precedence is being enforced such that the member access is evaluated before the addition. This seems intuitive because if the addition were to be evaluated first, then we would have <code>p.2</code> which is nonsense. Nevertheless, it is clear that <code>.</code> is exhibiting behavior that the other separators don't.</p>