Appropriate use of namespace in C++ : <p>Coming from a Java background, I've got used to creating an object and using it's methods in main class by referencing the object and it's method, for example:</p>

<pre><code>object.objectMethod();
</code></pre>

<p>Having different classes with identical-named methods wasn't an issue, but now I'm doing a project in Arduino which is pretty much C++. A <a href="https://www.arduino.cc/en/Hacking/LibraryTutorial" rel="nofollow noreferrer">tutorial</a> on using classes in Arduino suggests using class name and double colons in .cpp file before every single method. A bit of googling led me to believe that this is called a namespace. Further googling on namespaces in C++ yielded various options of use of namespaces, but none of them were like the one in the Arduino tutorial and that got me puzzled.</p>

<p>My question: what is the appropriate use of namespaces and if using it as in linked tutorial is a good practice? </p>
