<?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>TechieDan &#187; jdk 5</title>
	<atom:link href="http://techiedan.com/tag/jdk-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://techiedan.com</link>
	<description>Your Search for The Tech Stuffs</description>
	<lastBuildDate>Tue, 22 May 2012 08:10:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Autoboxing in Java 5</title>
		<link>http://techiedan.com/2009/10/20/autoboxing-java-5/</link>
		<comments>http://techiedan.com/2009/10/20/autoboxing-java-5/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:00:11 +0000</pubDate>
		<dc:creator>techieDan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[autoboxing]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jdk 5]]></category>

		<guid isPermaLink="false">http://techiedan.com/?p=564</guid>
		<description><![CDATA[<p>Surprisingly after Sun Microsystems included the <strong>JDK 5</strong> and now it&#8217;s already JDK 6. JDK 7 is currently in closed beta mode and available for testing which shortly would be announced to be available sometime next year with a different syntax in certain codes.</p>
<p>Did some code sampling and simple display to show what has changed [...]]]></description>
			<content:encoded><![CDATA[<p>Surprisingly after Sun Microsystems included the <strong>JDK 5</strong> and now it&#8217;s already JDK 6. JDK 7 is currently in closed beta mode and available for testing which shortly would be announced to be available sometime next year with a different syntax in certain codes.</p>
<p>Did some code sampling and simple display to show what has changed from <strong>Java 1.4 to Java 5</strong>. The changes were major. From here I am going to explain is <strong>Integer and int</strong> data type the same? This is what we call the concept of <span style="color: #0000ff;"><strong>AUTOBOXING</strong></span>.</p>
<p><img class="alignnone size-full wp-image-580" title="AutoBoxing Java" src="http://techiedan.com/wp-content/uploads/2009/10/boxes.jpg" alt="AutoBoxing Java" width="510" height="358" /></p>
<p>Some basic Integer and int Autoboxing comparison done.</p>
<pre class="brush: java; title: ; notranslate">

public class TestInt {

public static void main(String[] args) {

Integer e = 1;
int f = 1;
//Delclare variables

if (e == f)
System.out.println(&quot;gila same&quot;);
else
System.out.println(&quot;The value is Not the same&quot;);

System.exit(0); //Exit System

}

}
</pre>
<p>If you are doing this code, try to copy this onto your IDE and compile it. Most probably you will get the ClassCastException or just a display saying &#8220;<span style="color: #0000ff;"><em>The value is not the same</em></span>&#8221; if you&#8217;re running this code on <strong>JDK 1.4 or lower</strong>. The amazing feat by <strong>Java 5 and above</strong> is that now Java would know that though Integer and int are two different variable types, it will try to <strong>assimilate both to appear the same</strong>.</p>
<p>The resulting result is it will compare both the different data types and presto, Line 10 will display &#8220;<span style="color: #0000ff;"><em>Gila Same</em></span>&#8220;.</p>
<p><em>Additional Notes : There are many more things Java has changed since JDK 1.4. More articles and examples will be out soon for this programming language.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://techiedan.com/2009/10/20/autoboxing-java-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

