Getting ANDROID_ID Trying to understand the java
<p>I'm still new to programming/Java/Android so I'm trying to understand everything I do and trying to figure out how to properly read the reference section of developer.android.com and so maybe one of you guys can help me out. Thanks in advance</p>

<p>These calls get me the ANDROID_ID. They both give me the same output. I just do not understand how the Second Way works. It shouldn't work in my opinion. </p>

<h2>First way</h2>

<pre><code>AndroidID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
</code></pre>

<h2>Second way</h2>

<pre><code>AndroidID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
</code></pre>

<p>Why does it work like that?</p>

<p>I used <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID" rel="nofollow">this</a> to find the getString() method. I get the ANDROID_ID. It works perfectly using both calls, but I want to know why it works the second way.</p>
