Android Programming and Java syntax
<p>This is a question regarding the syntax used in Eclipse SDK while programming some JAVA code for an Android App.</p>

<p>I am an embedded microcontroller engineer that's mainly used to programming in Assembler (a long time ago) and C. I am a newbie when it comes C++ and JAVA and to help me write my code I have been using a mix of the developer.android.com for background info and stackoverflow.com for real world examples and have found them very useful.</p>

<p>So, I have no problem writing code to do what I want to do because I've always done it, but I am finding it very difficult getting my head around the syntax used in writing Android Apps.</p>

<p>For example to access the GPS one of my lines of code read thus:</p>

<pre><code>LocationManager locationManager = (LocationManager)
this.getSystemService(Context.LOCATION_SERVICE);
</code></pre>

<p>but can be shortened to this:</p>

<pre><code>LocationManager locationManager = (LocationManager)getSystemService(LOCATION_SERVICE);
</code></pre>

<p>I prefer the second version, but why were some examples written like the first example? Both seem to work fine. I've seen other examples that look even more complicated using "Class".</p>

<p>Secondly, is this not a complicated way to do a really simple thing:</p>

<pre><code>Toast.makeText(getBaseContext(),"Hello World",Toast.LENGTH_SHORT).show();
</code></pre>

<p>Why not:</p>

<pre><code>Toast("Hello world");
</code></pre>

<p>It now takes me four times as long as it use to write code.</p>
