<?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>decimal-numbers | Automation Dojos</title>
	<atom:link href="https://www.automationdojos.com/tag/decimal-numbers/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.automationdojos.com/tag/decimal-numbers/</link>
	<description>Applied Automation Ops</description>
	<lastBuildDate>Wed, 12 Jan 2022 01:58:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.automationdojos.com/wp-content/uploads/2021/06/Adjo_X_fav_32.png</url>
	<title>decimal-numbers | Automation Dojos</title>
	<link>https://www.automationdojos.com/tag/decimal-numbers/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Format Decimal Numbers with Grouping Separator</title>
		<link>https://www.automationdojos.com/format-decimal-with-group-separator/</link>
					<comments>https://www.automationdojos.com/format-decimal-with-group-separator/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Mon, 12 Aug 2019 01:32:00 +0000</pubDate>
				<category><![CDATA[Github Gists]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Gists]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code-gists]]></category>
		<category><![CDATA[decimal-numbers]]></category>
		<category><![CDATA[group-separator]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java.text.DecimalFormat]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=23355</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-with-group-separator/">Format Decimal Numbers with Grouping Separator</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" fetchpriority="high" srcset="https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>The DecimalFormat class has a method called setGroupingSize() which sets how many digits of the integer part to group. Groups are separated by the grouping separator. Hence you can use setGroupingSize() method to change the default group digits number as you need. The following example demonstrates setting grouping separator for integer part of the decimal [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/format-decimal-with-group-separator/">Format Decimal Numbers with Grouping Separator</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-with-group-separator/">Format Decimal Numbers with Grouping Separator</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/08/post-gist-deci-with-grp-separator-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>The DecimalFormat class has a method called setGroupingSize() which sets how many digits of the integer part to group. Groups are separated by the grouping separator. Hence you can use setGroupingSize() method to change the default group digits number as you need.</p>



<p>The following example demonstrates setting grouping separator for integer part of the decimal number:</p>



<div><script src="https://gist.github.com/219bd6a59d7bd881631c58a62a5ed178.js"></script></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The above code produces the following output:</p>



<pre class="wp-block-code"><code>170180.24551 GroupSize(4) = 17,0180.246 </code></pre>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/decimal-numbers/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23355" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=decimal-numbers&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23355" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23355" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/decimal-numbers/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23355&title=decimal-numbers" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=decimal-numbers https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23355" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=23355" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=23355', 'decimal-numbers', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/format-decimal-with-group-separator/">Format Decimal Numbers with Grouping Separator</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/format-decimal-with-group-separator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Format Decimal Numbers using Strings Within Pattern</title>
		<link>https://www.automationdojos.com/format-decimals-strings-within-pattern/</link>
					<comments>https://www.automationdojos.com/format-decimals-strings-within-pattern/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Thu, 25 Jul 2019 00:40:00 +0000</pubDate>
				<category><![CDATA[Github Gists]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Gists]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code-gists]]></category>
		<category><![CDATA[decimal-numbers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java.text.DecimalFormat]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=23342</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/format-decimals-strings-within-pattern/">Format Decimal Numbers using Strings Within Pattern</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>As mentioned in earlier posts, the java.text.DecimalFormat class is used to format decimal numbers via predefined patterns specified as String. Apart from the decimal separator, grouping separator, currency separator etc., It is also possible to mix String literals within the pattern. The following example demonstrates embedding String literals within pattern: The above code produces the [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/format-decimals-strings-within-pattern/">Format Decimal Numbers using Strings Within Pattern</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/format-decimals-strings-within-pattern/">Format Decimal Numbers using Strings Within Pattern</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingstring-pattern-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>As mentioned in earlier posts, the java.text.DecimalFormat class is used to format decimal numbers via predefined patterns specified as String.</p>



<p>Apart from the decimal separator, grouping separator, currency separator etc., It is also possible to mix String literals within the pattern.</p>



<p>The following example demonstrates embedding String literals within pattern:</p>



<div><script src="https://gist.github.com/b8c17d2e8b2af4b43df92c35de7031e8.js"></script></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The above code produces the following output:</p>



<pre class="wp-block-code"><code>My formatted number is 170,180.246</code></pre>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/decimal-numbers/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23342" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=decimal-numbers&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23342" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23342" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/decimal-numbers/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23342&title=decimal-numbers" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=decimal-numbers https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23342" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=23342" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=23342', 'decimal-numbers', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/format-decimals-strings-within-pattern/">Format Decimal Numbers using Strings Within Pattern</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/format-decimals-strings-within-pattern/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Format Decimal Numbers Using Format Symbols</title>
		<link>https://www.automationdojos.com/format-decimal-using-format-symbols/</link>
					<comments>https://www.automationdojos.com/format-decimal-using-format-symbols/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Fri, 12 Jul 2019 23:41:00 +0000</pubDate>
				<category><![CDATA[Github Gists]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Gists]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code-gists]]></category>
		<category><![CDATA[decimal-numbers]]></category>
		<category><![CDATA[DecimalFormatSymbols]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java.text.DecimalFormat]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=23337</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-using-format-symbols/">Format Decimal Numbers Using Format Symbols</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>You can customize which symbols are used as decimal separator, grouping separator, currency seperator etc. using a DecimalFormatSymbols instance together with java.text.DecimalFormat class. The DecimalFormatSymbols instance can be passed to java.text.DecimalFormat constructor followed by the call to format() method of java.text.DecimalFormat to achieve the desired decimal separator, grouping separator character etc. The following example demonstrates [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/format-decimal-using-format-symbols/">Format Decimal Numbers Using Format Symbols</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-using-format-symbols/">Format Decimal Numbers Using Format Symbols</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/07/post-gist-decimal-usingformatsymbols-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>You can customize which symbols are used as decimal separator, grouping separator, currency seperator etc. using a DecimalFormatSymbols instance together with  <strong>java.text.DecimalFormat</strong> class.</p>



<p>The <strong>DecimalFormatSymbols</strong> instance can be passed to  java.text.DecimalFormat constructor followed by the call to format() method of  java.text.DecimalFormat to achieve the desired decimal separator, grouping separator character etc.</p>



<p>The following example demonstrates formatting using DecimalFormatSymbols:</p>



<div><script src="https://gist.github.com/6a0a52cac039f0020809ed8feb43ddb9.js"></script></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The above code produces the following output:</p>



<pre class="wp-block-code"><code>$170:180-246</code></pre>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/decimal-numbers/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23337" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=decimal-numbers&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23337" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23337" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/decimal-numbers/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23337&title=decimal-numbers" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=decimal-numbers https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23337" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=23337" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=23337', 'decimal-numbers', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/format-decimal-using-format-symbols/">Format Decimal Numbers Using Format Symbols</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/format-decimal-using-format-symbols/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Format Decimal Numbers Using Locale</title>
		<link>https://www.automationdojos.com/format-decimal-using-locale/</link>
					<comments>https://www.automationdojos.com/format-decimal-using-locale/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 18 Jun 2019 22:03:00 +0000</pubDate>
				<category><![CDATA[Github Gists]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Gists]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code-gists]]></category>
		<category><![CDATA[decimal-numbers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java.text.DecimalFormat]]></category>
		<category><![CDATA[locale]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=23332</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-using-locale/">Format Decimal Numbers Using Locale</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>If you want to create a DecimalFormat instance for a specific Locale, create a NumberFormat and cast it to a DecimalFormat. The java.text.DecimalFormat class is used to format numbers using a user specified formatting. This concrete subclass of NumberFormat, allows formatting decimal numbers via predefined patterns specified as String . It has a variety of [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/format-decimal-using-locale/">Format Decimal Numbers Using Locale</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/format-decimal-using-locale/">Format Decimal Numbers Using Locale</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usinglocale-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>If you want to create a DecimalFormat instance for a specific Locale, create a NumberFormat and cast it to a DecimalFormat.</p>



<p>The <strong>java.text.DecimalFormat</strong> class is used to format numbers using a user specified formatting. This concrete subclass of <strong><em>NumberFormat</em></strong>, allows formatting decimal numbers via predefined patterns specified as String . It has a variety of features designed to make it possible to parse and format numbers in any locale.</p>



<p>The following example demonstrates decimal formatting as per specified locale:</p>



<div><script src="https://gist.github.com/0fa83bd59d1e1cea2f69be1c557010fc.js"></script></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The above code produces the following output:</p>



<pre class="wp-block-code"><code>170,180.245 - English (en)
170&nbsp;180,245 - French (France) (fr-FR)
170.180,245 - German (de-DE)</code></pre>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/decimal-numbers/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23332" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=decimal-numbers&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23332" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23332" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/decimal-numbers/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23332&title=decimal-numbers" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=decimal-numbers https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23332" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=23332" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=23332', 'decimal-numbers', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/format-decimal-using-locale/">Format Decimal Numbers Using Locale</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/format-decimal-using-locale/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Format Decimal Numbers Using Pattern</title>
		<link>https://www.automationdojos.com/format-decimals-using-pattern/</link>
					<comments>https://www.automationdojos.com/format-decimals-using-pattern/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Wed, 12 Jun 2019 21:42:00 +0000</pubDate>
				<category><![CDATA[Github Gists]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Gists]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code-gists]]></category>
		<category><![CDATA[decimal-numbers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java.text.DecimalFormat]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=23328</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/format-decimals-using-pattern/">Format Decimal Numbers Using Pattern</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>The java.text.DecimalFormat class is used to format numbers using a user specified formatting. This concrete subclass of NumberFormat, allows formatting decimal numbers via predefined patterns specified as String. It has a variety of features designed to make it possible to parse and format numbers in any locale The following example shows formatting decimal numbers using [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/format-decimals-using-pattern/">Format Decimal Numbers Using Pattern</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/format-decimals-using-pattern/">Format Decimal Numbers Using Pattern</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern.png 575w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2022/01/post-gist-decimal-usingpattern-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>The <strong>java.text.DecimalFormat</strong> class is used to format numbers using a user specified formatting. This concrete subclass of <strong><em>NumberFormat</em></strong>, allows formatting decimal numbers via predefined patterns specified as String. It has a variety of features designed to make it possible to parse and format numbers in any locale</p>



<p>The following example shows formatting decimal numbers using various string patterns:</p>



<div><script src="https://gist.github.com/4c8d7923a6dcd7cdc6ac489ba6c59bdc.js"></script></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The above code produces the following output:</p>



<pre class="wp-block-code"><code>    170180.24523 -&gt; 170180.24523
    170180.24523 -&gt; 170180.245
    170180.24523 -&gt; 170180.245230
    170180.24523 -&gt; 170180
    170180.24523 -&gt; 0170180.245
    170180.24523 -&gt; 17018024.52%</code></pre>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/decimal-numbers/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23328" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=decimal-numbers&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23328" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23328" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/decimal-numbers/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23328&title=decimal-numbers" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=decimal-numbers https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D23328" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=23328" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=23328', 'decimal-numbers', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/format-decimals-using-pattern/">Format Decimal Numbers Using Pattern</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/format-decimals-using-pattern/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
