user23571: MyProject.ino:
#include "MyClass.h"

void setup()
{
  Serial.begin(9600);
  // MyClass.MyStaticMethod();
  MyClass::MyStaticMethod();
}

Both uncommented lines work, but the commented (when uncommented, of course) results in this error: expected unqualified-id before '.' token.
Now, I know this is because of the incorrect scope-resolution. Yet, how come Serial manages to call static functions without the need to use :: to correction to scope-resolution.
How come MyClass.MyStaticMethod() doesn't work, but Serial.begin() does?

user4143: . is used to call a method on a class instance whereas :: is used to call a static method within a class itself.
There is no Serial class - Serial is merely an instance of the HardwareSerial class.
#if defined(UBRRH) && defined(UBRRL)
  HardwareSerial Serial(&UBRRH, &UBRRL, &UCSRA, &UCSRB, &UCSRC, &UDR);
#else
  HardwareSerial Serial(&UBRR0H, &UBRR0L, &UCSR0A, &UCSR0B, &UCSR0C, &UDR0);
#endif

If you want to use . then you have to instantiate your class and not use a static method:
class MyClass {
    static void myStaticMethod() {
    }
    void myMethod() {
    }
};

MyClass Fred;

// ... 

Fred.myMethod();
MyClass::myStaticMethod();


23571: <p><code>MyProject.ino</code>:</p>

<pre><code>#include "MyClass.h"

void setup()
{
  Serial.begin(9600);
  // MyClass.MyStaticMethod();
  MyClass::MyStaticMethod();
}
</code></pre>

<p>Both uncommented lines work, but the commented (when uncommented, of course) results in this error: <code>expected unqualified-id before '.' token</code>.</p>

<p>Now, I know this is because of the incorrect scope-resolution. Yet, how come <code>Serial</code> manages to call static functions without the need to use <code>::</code> to correction to scope-resolution.</p>

<p><strong>How come <code>MyClass.MyStaticMethod()</code> doesn't work, but <code>Serial.begin()</code> does?</strong></p>
 4143: <p><code>.</code> is used to call a method on a class <em>instance</em> whereas <code>::</code> is used to call a static method within a class itself.</p>

<p>There is no <code>Serial</code> class - <code>Serial</code> is merely an instance of the <code>HardwareSerial</code> class.</p>

<pre><code>#if defined(UBRRH) &amp;&amp; defined(UBRRL)
  HardwareSerial Serial(&amp;UBRRH, &amp;UBRRL, &amp;UCSRA, &amp;UCSRB, &amp;UCSRC, &amp;UDR);
#else
  HardwareSerial Serial(&amp;UBRR0H, &amp;UBRR0L, &amp;UCSR0A, &amp;UCSR0B, &amp;UCSR0C, &amp;UDR0);
#endif
</code></pre>

<p>If you want to use <code>.</code> then you have to instantiate your class and not use a static method:</p>

<pre><code>class MyClass {
    static void myStaticMethod() {
    }
    void myMethod() {
    }
};

MyClass Fred;

// ... 

Fred.myMethod();
MyClass::myStaticMethod();
</code></pre>
