<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JSP, Tomcat, JDBC, Projects, Example, Program &#187; Math</title>
	<atom:link href="http://www.easywayserver.com/blog/tag/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.easywayserver.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 06 Sep 2010 17:21:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Java &#8211; Math sqrt() Example, Math sqrt() Function</title>
		<link>http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/</link>
		<comments>http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 12:31:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=302</guid>
		<description><![CDATA[Math class is part of java.lang package. Math sqrt method returns the square root value of the argument. If argument value is less than zero, it will return NaN value. sqrt function return type is double or float.
Math sqrt example explains how to use Math sqrt function in java.

public class JavaMathSqrtExample {

    [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-sqrt-example-math-sqrt-function%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-sqrt-example-math-sqrt-function%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math sqrt method returns the square root value of the argument. If argument value is less than zero, it will return NaN value. sqrt function return type is double or float.</p>
<p>Math sqrt example explains how to use Math sqrt function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathSqrtExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>sqrt<span style='color:#808030; '>(</span><span style='color:#008c00; '>16</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>sqrt<span style='color:#808030; '>(</span><span style='color:#008000; '>144.6793</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>sqrt<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>2323.8393</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math Square root value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math Square root value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math Square root value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math Square root value :4.0<br />
Math Square root value :12.02827086492485<br />
Math Square root value :NaN
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-cbrt-example-math-cbrt-program-math-cube-root/" rel="bookmark" class="crp_title">Java &#8211; Math cbrt Example, Math cbrt Program, Math cube root</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/" rel="bookmark" class="crp_title">Java &#8211; Math signum() Example, Math signum() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math signum() Example, Math signum() Function</title>
		<link>http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/</link>
		<comments>http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 12:19:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/</guid>
		<description><![CDATA[Math class is part of java.lang package. Math signum method returns the argument either 1.0 or -1.0. If argument value is less than zero, it will return -1.0 value and argument is greater than zero or zero, it will return 1.0. signum function return type is double or float. 
Math signum example explains how to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-signum-example-math-signum-function%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-signum-example-math-signum-function%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math signum method returns the argument either 1.0 or -1.0. If argument value is less than zero, it will return -1.0 value and argument is greater than zero or zero, it will return 1.0. signum function return type is double or float. </p>
<p>Math signum example explains how to use Math signum function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathSignumExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>signum<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.4393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>signum<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>signum<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>2323.8393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math signum value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math signum value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math signum value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math signum value :1.0<br />
Math signum value :0.0<br />
Math signum value :-1.0
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/" rel="bookmark" class="crp_title">Java &#8211; Math sqrt() Example, Math sqrt() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math round() Example, Math round() Function, Remove decimal</title>
		<link>http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/</link>
		<comments>http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 11:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=296</guid>
		<description><![CDATA[Math class is part of java.lang package. Math round method returns the argument closest to integer value of the number. If fraction value is more than point 5, it will add 1 to original value nearest to positive value. round function return type is double or float. round function remove decimal number from value and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-round-example-math-round-program-remove-decimal%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-round-example-math-round-program-remove-decimal%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math round method returns the argument closest to integer value of the number. If fraction value is more than point 5, it will add 1 to original value nearest to positive value. round function return type is double or float. round function remove decimal number from value and return only number without decimal.</p>
<p>Math round example explains how to use Math round function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathRoundExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.4393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.8393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>2323.8393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>float</span> F1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.43930</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>float</span> F2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.8393</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>float</span> F3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>2323.8393</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>F1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>F2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math round value :&quot;</span><span style='color:#808030; '>+</span>F3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math round value :2323.0<br />
Math round value :2324.0<br />
Math round value :-2324.0<br />
Math round value :2323.0<br />
Math round value :2324.0<br />
Math round value :-2324.0
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-random-example-math-random-program-generate-random-number/" rel="bookmark" class="crp_title">Java &#8211; Math random() Example, Math random() Program, Generate random number</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/" rel="bookmark" class="crp_title">Java &#8211; Math signum() Example, Math signum() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/" rel="bookmark" class="crp_title">Java &#8211; Math sqrt() Example, Math sqrt() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math rint() Example, Math rint() Program</title>
		<link>http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:58:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=294</guid>
		<description><![CDATA[Math class is part of java.lang package. Math rint method returns the argument that is close to integer number in fraction. rint function return type is double. 
Math rint example explains how to use Math rint function in java.

public class JavaMathRintExample {

    public static void main(String[] args) {

     [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-rint-example-math-rint-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-rint-example-math-rint-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math rint method returns the argument that is close to integer number in fraction. rint function return type is double. </p>
<p>Math rint example explains how to use Math rint function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathRintExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>rint<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.4393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>rint<span style='color:#808030; '>(</span><span style='color:#008000; '>2323.8393086905318781</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math rint value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math rint value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math rint value :2323.0<br />
Math rint value :2324.0
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/" rel="bookmark" class="crp_title">Java &#8211; Math signum() Example, Math signum() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-sqrt-example-math-sqrt-function/" rel="bookmark" class="crp_title">Java &#8211; Math sqrt() Example, Math sqrt() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/" rel="bookmark" class="crp_title">Java &#8211; Math floor() Example, Math floor Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math random() Example, Math random() Program, Generate random number</title>
		<link>http://www.easywayserver.com/blog/java-math-random-example-math-random-program-generate-random-number/</link>
		<comments>http://www.easywayserver.com/blog/java-math-random-example-math-random-program-generate-random-number/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:45:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/java-math-random-example-math-random-program-generate-random-number/</guid>
		<description><![CDATA[Math class is part of java.lang package. Math random method returns random number in fraction of double among 0.0 to 1.0. random function return type is double. With random function we can generate random number easily. Generating integer and long random number example is shown to create random number.
Math random example explains how to use [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-random-example-math-random-program-generate-random-number%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-random-example-math-random-program-generate-random-number%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math random method returns random number in fraction of double among 0.0 to 1.0. random function return type is double. With random function we can generate random number easily. Generating integer and long random number example is shown to create random number.</p>
<p>Math random example explains how to use Math random function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathRandomExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>random<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> 

        <span style='color:#bb7977; '>long</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>random<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#808030; '>*</span><span style='color:#008c00; '>10</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> <span style='color:#696969; '>// 1 digit random</span>

        <span style='color:#bb7977; '>long</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>random<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#808030; '>*</span><span style='color:#008c00; '>100</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> <span style='color:#696969; '>//2 digit random</span>

        <span style='color:#bb7977; '>long</span> E4 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>round<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>random<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#808030; '>*</span><span style='color:#008c00; '>1000</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> <span style='color:#696969; '>//3 digit random</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math random value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math random value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math random value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math random value :&quot;</span><span style='color:#808030; '>+</span>E4<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math random value :0.8393086905318781<br />
Math random value :3<br />
Math random value :82<br />
Math random value :719
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/" rel="bookmark" class="crp_title">Java &#8211; Math ceil Example, Math ceil Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-cbrt-example-math-cbrt-program-math-cube-root/" rel="bookmark" class="crp_title">Java &#8211; Math cbrt Example, Math cbrt Program, Math cube root</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-random-example-math-random-program-generate-random-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math pow() Example, Math pow() Program</title>
		<link>http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:13:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=286</guid>
		<description><![CDATA[Math class is part of java.lang package. Math pow method returns value of first argument of power of second numbers e.g 23. pow function return type is double. 
Math pow example explains how to use Math pow function in java.

public class JavaMathPowExample {

    public static void main(String[] args) {

    [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-pow-example-math-pow-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-pow-example-math-pow-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math pow method returns value of first argument of power of second numbers e.g 2<sup>3</sup>. pow function return type is double. </p>
<p>Math pow example explains how to use Math pow function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathPowExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>pow<span style='color:#808030; '>(</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>,</span> <span style='color:#008c00; '>3</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> <span style='color:#696969; '>// 2x2x2=8</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>pow<span style='color:#808030; '>(</span><span style='color:#008000; '>2.23</span><span style='color:#808030; '>,</span> <span style='color:#008000; '>3.45</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math pow value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math pow value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math pow value :8.0<br />
Math pow value :15.909325868265608
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-signum-example-math-signum-function/" rel="bookmark" class="crp_title">Java &#8211; Math signum() Example, Math signum() Function</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/" rel="bookmark" class="crp_title">Java &#8211; Math floor() Example, Math floor Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/" rel="bookmark" class="crp_title">Java &#8211; Math ceil Example, Math ceil Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math min() Example, Math min() Program</title>
		<link>http://www.easywayserver.com/blog/java-math-min-example-math-min-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-min-example-math-min-program/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 05:58:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=284</guid>
		<description><![CDATA[Math class is part of java.lang package. Math min method returns the smallest lowest value of two numbers. If value is negative, it will return lowest value nearest to positive value. min function return type is double. min method find  lowest smallest value between 2 number and compare two value to get smallest number.
Math [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-min-example-math-min-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-min-example-math-min-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math min method returns the smallest lowest value of two numbers. If value is negative, it will return lowest value nearest to positive value. min function return type is double. min method find  lowest smallest value between 2 number and compare two value to get smallest number.</p>
<p>Math min example explains how to use Math min function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathMinExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>min<span style='color:#808030; '>(</span><span style='color:#008000; '>34.45</span><span style='color:#808030; '>,</span> <span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>min<span style='color:#808030; '>(</span><span style='color:#008000; '>14.45</span><span style='color:#808030; '>,</span> <span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>min<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>14.45</span><span style='color:#808030; '>,</span> <span style='color:#808030; '>-</span><span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math min value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math min value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math min value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math min value :23.67<br />
Math min value :14.45<br />
Math min value :-23.67
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/" rel="bookmark" class="crp_title">Java &#8211; Math floor() Example, Math floor Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/" rel="bookmark" class="crp_title">Java &#8211; Math ceil Example, Math ceil Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-min-example-math-min-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math max() Example, Math max() Program</title>
		<link>http://www.easywayserver.com/blog/java-math-max-example-math-max-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-max-example-math-max-program/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 09:10:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/java-math-max-example-math-max-program/</guid>
		<description><![CDATA[Math class is part of java.lang package. Math max method returns the bigger highest value of two double numbers with fraction. If value is negative, it will return highest value nearest to positive value. max function return type is double. Max method find highest bigger value between 2 number and compare two value to get [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-max-example-math-max-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-max-example-math-max-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math max method returns the bigger highest value of two double numbers with fraction. If value is negative, it will return highest value nearest to positive value. max function return type is double. Max method find highest bigger value between 2 number and compare two value to get bigger number.</p>
<p>Math max example explains how to use Math max function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathMaxExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>max<span style='color:#808030; '>(</span><span style='color:#008000; '>34.45</span><span style='color:#808030; '>,</span> <span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>max<span style='color:#808030; '>(</span><span style='color:#008000; '>14.45</span><span style='color:#808030; '>,</span> <span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>max<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>14.45</span><span style='color:#808030; '>,</span> <span style='color:#808030; '>-</span><span style='color:#008000; '>23.67</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math max value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math max value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math max value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math max value :34.45<br />
Math max value :23.67<br />
Math max value :-14.45
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/" rel="bookmark" class="crp_title">Java &#8211; Math ceil Example, Math ceil Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/" rel="bookmark" class="crp_title">Java &#8211; Math floor() Example, Math floor Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-max-example-math-max-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math floor() Example, Math floor Program</title>
		<link>http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 08:56:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/</guid>
		<description><![CDATA[Math class is part of java.lang package. Math floor method returns the lower nearest value of double number in fraction. If value is negative, it will return nearest to lowest value. floor function return type is double.
Math floor example explains how to use Math floor function in java.

public class JavaMathFloorExample {

    public [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-floor-example-math-floor-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-floor-example-math-floor-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math floor method returns the lower nearest value of double number in fraction. If value is negative, it will return nearest to lowest value. floor function return type is double.</p>
<p>Math floor example explains how to use Math floor function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathFloorExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>floor<span style='color:#808030; '>(</span><span style='color:#008000; '>14.2345</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>floor<span style='color:#808030; '>(</span><span style='color:#008000; '>14.5345</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>floor<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>14.2345</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E4 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>floor<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>14.5345</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math floor value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math floor value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math floor value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math floor value :&quot;</span><span style='color:#808030; '>+</span>E4<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math floor value :14.0<br />
Math floor value :14.0<br />
Math floor value :-15.0<br />
Math floor value :-15.0
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/" rel="bookmark" class="crp_title">Java &#8211; Math ceil Example, Math ceil Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Math ceil Example, Math ceil Program</title>
		<link>http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/</link>
		<comments>http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 08:20:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program-math-ceil-root/</guid>
		<description><![CDATA[Math class is part of java.lang package. Math ceil method returns the upper nearest value of double number in fraction. If value is negative, it will return nearest to highest value. ceil function return type is double.
Math ceil example explains how to use Math ceil function in java.

public class JavaMathCeilExample {

    public [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-ceil-example-math-ceil-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fjava-math-ceil-example-math-ceil-program%2F" height="61" width="51" /></a></div><p>Math class is part of java.lang package. Math ceil method returns the upper nearest value of double number in fraction. If value is negative, it will return nearest to highest value. ceil function return type is double.</p>
<p>Math ceil example explains how to use Math ceil function in java.</p>
<div class="cde">
<pre><span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> JavaMathCeilExample <span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#bb7977; '>void</span> main<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span><span style='color:#808030; '>[</span><span style='color:#808030; '>]</span> args<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>double</span> E1 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>ceil<span style='color:#808030; '>(</span><span style='color:#008000; '>15.156</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E2 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>ceil<span style='color:#808030; '>(</span><span style='color:#808030; '>-</span><span style='color:#008000; '>15.156</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; '>double</span> E3 <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>Math</span><span style='color:#808030; '>.</span>ceil<span style='color:#808030; '>(</span><span style='color:#008c00; '>15</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math ceil value :&quot;</span><span style='color:#808030; '>+</span>E1<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math ceil value :&quot;</span><span style='color:#808030; '>+</span>E2<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#bb7977; font-weight:bold; '>System</span><span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#0000e6; '>&quot;Math ceil value :&quot;</span><span style='color:#808030; '>+</span>E3<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p><strong>Output</strong></p>
<div class="cde">
<p class="op">
Math ceil value :16.0<br />
Math ceil value :-15.0<br />
Math ceil value :15.0
</p>
</div>
<div id="crp_related"><h3>Related Posts:</h3><ul style="list-style:disc;padding-left:20px"><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-max-example-math-max-program/" rel="bookmark" class="crp_title">Java &#8211; Math max() Example, Math max() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-floor-example-math-floor-program/" rel="bookmark" class="crp_title">Java &#8211; Math floor() Example, Math floor Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-min-example-math-min-program/" rel="bookmark" class="crp_title">Java &#8211; Math min() Example, Math min() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-round-example-math-round-program-remove-decimal/" rel="bookmark" class="crp_title">Java &#8211; Math round() Example, Math round() Function, Remove decimal</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-rint-example-math-rint-program/" rel="bookmark" class="crp_title">Java &#8211; Math rint() Example, Math rint() Program</a></li><li style="padding-left:8px"><a href="http://www.easywayserver.com/blog/java-math-pow-example-math-pow-program/" rel="bookmark" class="crp_title">Java &#8211; Math pow() Example, Math pow() Program</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/java-math-ceil-example-math-ceil-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
