Can an object belong to two classes? : <p>Just started learning Java, through the "hello world" app, k learned about the object System.out.</p>

<p>Out is an object, but to use it, we have to write system in front of it. It's obvious and my book says that out belongs to system class.</p>

<p>But later in the book, my book says out also belongs to PrintStream class. That is what enable us to use println methods because they both belong to PrintStream class. </p>

<p>I am confused what class does out belong to?</p>

<p>Also, is it just a convention that for objects like out, we have to write the class as well whenever we use it. For something like;</p>

<blockquote>
  <p>String greeting = "Hello, World!";
  If we want to use .length() method which I guess also belongs to string class, we DONT write: 
  int n=String.greeting.length()</p>
</blockquote>

<p>Instead, it's just:
int n=greeting.();</p>
