<?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>web development helpdesk &#187; DecimalFormat</title>
	<atom:link href="http://helpdesk.objects.com.au/tag/decimalformat/feed" rel="self" type="application/rss+xml" />
	<link>http://helpdesk.objects.com.au</link>
	<description>objects quality - the visible difference</description>
	<lastBuildDate>Sun, 17 Jul 2011 12:27:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>How to parse value using locale rules</title>
		<link>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-parse-value-using-locale-rules</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules#comments</comments>
		<pubDate>Sat, 19 Feb 2011 02:22:15 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[Locale]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[parse]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1763</guid>
		<description><![CDATA[The NumberFormat and DecimalFormat classes provide support for parsing and formatting values. They are also locale sensitive, which means they adjust the formatting and parsing rules according to the locale or region of interest. For example in France they use a comma as a decimal separator so 5,48 is the same as 5.48 in the [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to parse a currency value using Java</title>
		<link>http://helpdesk.objects.com.au/java/how-to-parse-a-currency-value-using-java?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-parse-a-currency-value-using-java</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-parse-a-currency-value-using-java#comments</comments>
		<pubDate>Sat, 19 Feb 2011 02:03:59 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Currency]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[Locale]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[parse]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1761</guid>
		<description><![CDATA[The NumberFormat and DecimalFormat classes provide support for parsing and formatting currency values. For example to parse a string containing a money value in the default locale you can use the following. NumberFormat format = NumberFormat.getCurrencyInstance(); Object value = format.parse(&#34;$5.45&#34;); Related posts: How to format a currency value The NumberFormat class provides support for currency [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-parse-a-currency-value-using-java/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to format value as a percentage</title>
		<link>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-format-value-as-a-percentage</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage#comments</comments>
		<pubDate>Mon, 13 Dec 2010 21:50:25 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[percent]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1723</guid>
		<description><![CDATA[When you need to format a number as a percent you can use the &#8216;%&#8217; symbol in your DecimalFormat string. The static helper method getPercentInstance() can also be used if you don&#8217;t need complete control over the format string. When the % symbol is used the value is first multiplied by 100 before applying the [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating BigDecimal from localized strings</title>
		<link>http://helpdesk.objects.com.au/java/creating-bigdecimal-from-localized-strings?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=creating-bigdecimal-from-localized-strings</link>
		<comments>http://helpdesk.objects.com.au/java/creating-bigdecimal-from-localized-strings#comments</comments>
		<pubDate>Sat, 14 Nov 2009 23:49:01 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[Locale]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[parse]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1281</guid>
		<description><![CDATA[The BigDecimal constructors do not take the Locale into account when parsing number strings. This means the following code will throw a NumberFormatException Locale.setDefault(new Locale(&#34;nl&#34;, &#34;NL&#34;)); String s = &#34;2.343.298,09324798&#34;; BigDecimal bd = new BigDecimal(s); To parse localized strings as BigDecimal we instead need to use the DecimalFormat class Locale.setDefault(new Locale(&#34;nl&#34;, &#34;NL&#34;)); String s = [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/creating-bigdecimal-from-localized-strings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to control decimal places displayed in JTable column?</title>
		<link>http://helpdesk.objects.com.au/java/how-to-control-decimal-places-displayed-in-jtable-column?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-control-decimal-places-displayed-in-jtable-column</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-control-decimal-places-displayed-in-jtable-column#comments</comments>
		<pubDate>Wed, 15 Apr 2009 17:13:40 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[swing]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[DefaultTableCellRenderer]]></category>
		<category><![CDATA[JTable]]></category>
		<category><![CDATA[TableCellRenderer]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1054</guid>
		<description><![CDATA[Rendering of table cells is handled by instances of TableCellRenderer. By default JTable uses a DefaultTableCellRenderer to render all of its cells. To control the number of decimal places used we just need to subclass DefaultTableCellRenderer and format the cell double value before passing the (formatted) value to to the parent (DefaultTableCellRenderer) class. To get [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-control-decimal-places-displayed-in-jtable-column/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How can I round a value up to nearest half?</title>
		<link>http://helpdesk.objects.com.au/java/how-can-i-round-a-value-up-to-nearest-half?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-can-i-round-a-value-up-to-nearest-half</link>
		<comments>http://helpdesk.objects.com.au/java/how-can-i-round-a-value-up-to-nearest-half#comments</comments>
		<pubDate>Tue, 24 Feb 2009 01:44:10 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[round]]></category>
		<category><![CDATA[rounding]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=813</guid>
		<description><![CDATA[Standard rounding provided by BigDecimal and DecimalFormat rounds to the nearest 0 or 1. If you instead want to round to 0, 1 or 0.5 then you need to do a little work For example to round up to 4 decimal places to the nearest 0, 1, or .5 you could use the following code. [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-can-i-round-a-value-up-to-nearest-half/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rounding strategy used by DecimalFormat?</title>
		<link>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rounding-strategy-used-by-decimalformat</link>
		<comments>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat#comments</comments>
		<pubDate>Mon, 23 Feb 2009 08:57:33 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[rounding]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=811</guid>
		<description><![CDATA[Decimal format uses BigDecimal.ROUND_HALF_EVEN and prior to 1.6 this cannot be changed. In 1.6 a setRoundingMethod() was added to allow the rounding strategy to be changed. DecimalFormat df = NumberFormat.getNumberInstance(); df.setRoundingMode(1, RoundingMode.HALF_UP); String formatted = df.format(12.345); If you need an alternate rounding strategy prior to 1.6 then you need to use BigDecimal to do your [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

