<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Balaji&#039;s Blog</title>
	<atom:link href="http://javaandjkpm.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javaandjkpm.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 22 Jan 2010 10:19:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='javaandjkpm.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Balaji&#039;s Blog</title>
		<link>http://javaandjkpm.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://javaandjkpm.wordpress.com/osd.xml" title="Balaji&#039;s Blog" />
	<atom:link rel='hub' href='http://javaandjkpm.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Runtime Polymorphism in Java</title>
		<link>http://javaandjkpm.wordpress.com/2010/01/20/runtime-polymorphism-in-java/</link>
		<comments>http://javaandjkpm.wordpress.com/2010/01/20/runtime-polymorphism-in-java/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 11:42:39 +0000</pubDate>
		<dc:creator>mathaiyan</dc:creator>
				<category><![CDATA[Java& OOPs]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Oop]]></category>
		<category><![CDATA[Polymorphism]]></category>

		<guid isPermaLink="false">http://javaandjkpm.wordpress.com/?p=13</guid>
		<description><![CDATA[Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. In other words, polymorphism allows you define one interface and have multiple implementation. This is one of the basic principles of object oriented programming. The method overriding is an example of runtime polymorphism. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaandjkpm.wordpress.com&amp;blog=11545520&amp;post=13&amp;subd=javaandjkpm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. In other words, polymorphism allows you define one interface and have multiple implementation. This is one of the basic principles of object oriented programming.</h4>
<h4>The method overriding is an example of runtime polymorphism. You can have a method in subclass overrides the method in its super classes with the same name and signature. Java virtual machine determines the proper method to call at the runtime, not at the compile time.</h4>
<h4>Let&#8217;s take a look at the following example:</h4>
<h4>class Animal {<br />
void whoAmI() {<br />
System.out.println(&#8220;I am a generic Animal.&#8221;);<br />
}<br />
}<br />
class Dog extends Animal {<br />
void whoAmI() {<br />
System.out.println(&#8220;I am a Dog.&#8221;);<br />
}<br />
}<br />
class Cow extends Animal {<br />
void whoAmI() {<br />
System.out.println(&#8220;I am a Cow.&#8221;);<br />
}<br />
}<br />
class Snake extends Animal {<br />
void whoAmI() {<br />
System.out.println(&#8220;I am a Snake.&#8221;);<br />
}<br />
}</p>
<p>class RuntimePolymorphismDemo {</p>
<p>public static void main(String[] args) {<br />
Animal ref1 = new Animal();<br />
Animal ref2 = new Dog();<br />
Animal ref3 = new Cow();<br />
Animal ref4 = new Snake();<br />
ref1.whoAmI();<br />
ref2.whoAmI();<br />
ref3.whoAmI();<br />
ref4.whoAmI();<br />
}<br />
}</h4>
<h4>The output is</h4>
<h4>I am a generic Animal.<br />
I am a Dog.<br />
I am a Cow.<br />
I am a Snake.</h4>
<h4>In the example, there are four variables of type Animal (e.g., <em>ref1</em>, <em>ref2</em>, <em>ref3</em>, and <em>ref4</em>). Only <em>ref1</em> refers to an instance of <em>Animal</em> class, all others refer to an instance of the subclasses of <em>Animal</em>. From the output results, you can confirm that version of a method is invoked based on the actually object&#8217;s type.</h4>
<h4>In Java, a variable declared type of class <em>A</em> can hold a reference to an object of class <em>A</em> or an object belonging  to any subclasses of class <em>A</em>. The program is able to resolve the correct method related to the subclass object at runtime. This is called the runtime polymorphism in Java. This provides the ability to override functionality already available in the class hierarchy tree. At runtime, which version of the method will be invoked is based on the type of actual object stored in that reference variable and not on the type of the reference variable.</h4>
<p>Deeply :</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaandjkpm.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaandjkpm.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaandjkpm.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaandjkpm.wordpress.com&amp;blog=11545520&amp;post=13&amp;subd=javaandjkpm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaandjkpm.wordpress.com/2010/01/20/runtime-polymorphism-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17a08236eae7021271aaac55bdf838ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mathaiyan</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon Elastic Compute Cloud (Amazon EC2)</title>
		<link>http://javaandjkpm.wordpress.com/2010/01/20/amazon-elastic-compute-cloud-amazon-ec2/</link>
		<comments>http://javaandjkpm.wordpress.com/2010/01/20/amazon-elastic-compute-cloud-amazon-ec2/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 11:26:40 +0000</pubDate>
		<dc:creator>mathaiyan</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://javaandjkpm.wordpress.com/?p=5</guid>
		<description><![CDATA[Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaandjkpm.wordpress.com&amp;blog=11545520&amp;post=5&amp;subd=javaandjkpm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Amazon Elastic Compute Cloud (<strong>Amazon EC2</strong>) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.</p>
<p>Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use.  Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaandjkpm.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaandjkpm.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaandjkpm.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaandjkpm.wordpress.com&amp;blog=11545520&amp;post=5&amp;subd=javaandjkpm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaandjkpm.wordpress.com/2010/01/20/amazon-elastic-compute-cloud-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/17a08236eae7021271aaac55bdf838ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mathaiyan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
