user72727: I'm just really curious because some codes really follow a format like this. Examples include serial.begin(), serial.println() and when I used servomotors the left part was the name of the servomotor, which I declared. I want to know what concept does the code with a format of Text1.Text2() refer to? What do you call Text1 and Text2? Are there official or commonly used terminologies for the concepts and parts such as "variable", "statement", "code"?
To add to my understanding, it appears that Text1 refers to an object and that Text2 has the concept of "function" where it performs something related to the object. Though I would think that another terminology would be possessed by Text2 other than function to distinguish it from a function since it is required to be written in the format I mentioned, which next to the object with a period separating them and no spaces at all.

user4143: The over-arching concept is Object Oriented Programming (OOP).
The terms I was taught at University - taking Serial.println() as an example:

Serial is an instance of a class (in this case HardwareSerial), sometimes called an object.
println() (a function in a class) is a method of a class.
A "variable" in a class is called a property of a class.

A commented code example:

class Foo { // This is the *class*

    public: // These symbols are accessible from outside the class

        int bar; // This is a public property

        void baz() { ​// This is a public method
        }

    private: // These symbols are only available from inside the class

       ​int meep; // This is a private property

       ​void moop() { // this is a private method
       }
};


Foo bar; // Instantiate an instance of the Foo class and call it bar.


72727: <p>I'm just really curious because some codes really follow a format like this. Examples include serial.begin(), serial.println() and when I used servomotors the left part was the name of the servomotor, which I declared. I want to know what concept does the code with a format of Text1.Text2() refer to? What do you call Text1 and Text2? Are there official or commonly used terminologies for the concepts and parts such as &quot;variable&quot;, &quot;statement&quot;, &quot;code&quot;?</p>
<p>To add to my understanding, it appears that Text1 refers to an object and that Text2 has the concept of &quot;function&quot; where it performs something related to the object. Though I would think that another terminology would be possessed by Text2 other than function to distinguish it from a function since it is required to be written in the format I mentioned, which next to the object with a period separating them and no spaces at all.</p>
 4143: <p>The over-arching concept is <em>Object Oriented Programming</em> (<a href="https://en.wikipedia.org/wiki/Object-oriented_programming" rel="nofollow noreferrer">OOP</a>).</p>
<p>The terms I was taught at University - taking <code>Serial.println()</code> as an example:</p>
<ul>
<li><code>Serial</code> is an <em>instance</em> of a <em>class</em> (in this case <code>HardwareSerial</code>), sometimes called an <em>object</em>.</li>
<li><code>println()</code> (a function in a class) is a <em>method</em> of a class.</li>
<li>A &quot;variable&quot; in a class is called a <em>property</em> of a class.</li>
</ul>
<p>A commented code example:</p>
<pre class="lang-cpp prettyprint-override"><code>
class Foo { // This is the *class*

    public: // These symbols are accessible from outside the class

        int bar; // This is a public property

        void baz() { ​// This is a public method
        }

    private: // These symbols are only available from inside the class

       ​int meep; // This is a private property

       ​void moop() { // this is a private method
       }
};


Foo bar; // Instantiate an instance of the Foo class and call it bar.
</code></pre>
