<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Scala (programming language) - Page 17 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Scala_(programming_language)&amp;p=16">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Scala_%28programming_language%29&amp;p=18">3.Next</a>
</p>
<p></p>

<p><big> Basic example </big></p>
<p>The following example shows the differences between Java and Scala syntax. The function mathFunction takes an integer, squares it, and then adds the cube root of that number to the natural log of that number, returning the result (i.e., ):</p>

<p>Some syntactic differences in this code are:</p>

<p>
* Scala does not require semicolons (;) to end statements.<br/>
* Value types are capitalized (sentence case): <code>Int, Double, Boolean</code> instead of <code>int, double, boolean</code>.<br/>
* Parameter and</p><p>
<a accesskey="1" href="page.php?w=Scala_(programming_language)&amp;p=16">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Scala_%28programming_language%29&amp;p=18">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
