<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2titles.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemtitles.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Java Tech Page 4u</title><link>http://javatechpage.blogspot.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JavaTechPage4u" /><description></description><language>en</language><managingEditor>noreply@blogger.com (GS)</managingEditor><lastBuildDate>Tue, 06 Dec 2011 01:52:47 PST</lastBuildDate><generator>Blogger</generator><atom:id xmlns:atom="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-5732959929032431013</atom:id><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">79</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">10</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JavaTechPage4u" /><feedburner:info uri="javatechpage4u" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>JavaTechPage4u</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/JavaTechPage4u" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FJavaTechPage4u" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><item><title>HTML 5 Media Elements With Example</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/sllUGt8WB0c/html-5-media-elements-with-example.html</link><category>HTML5</category><category>HTML</category><author>noreply@blogger.com (GS)</author><pubDate>Thu, 01 Dec 2011 17:35:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-4558341184730171713</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5Ps7Wb2sI-5t6lKQsXQ_yEb4Fmc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Ps7Wb2sI-5t6lKQsXQ_yEb4Fmc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5Ps7Wb2sI-5t6lKQsXQ_yEb4Fmc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Ps7Wb2sI-5t6lKQsXQ_yEb4Fmc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;The new HTML5 media elements are ..&lt;br /&gt;&lt;br /&gt;&amp;lt;audio&gt; : For audio content, sounds, music or other audio streams&lt;br /&gt;&amp;lt;video&gt; : For video content, such as a movie clip or other video streams&lt;br /&gt;&amp;lt;source&gt; : For media resources for media elements, defined inside video or audio elements&lt;br /&gt;&amp;lt;embed&gt; : For embedded content, such as a plug-in&lt;br /&gt;&amp;lt;track&gt; : For text tracks used in media players&lt;br /&gt;&lt;br /&gt;Audio example :&lt;br /&gt;&lt;div style="border: solid 1px #A9B7C6;background:#1AFA1F"&gt;&lt;br /&gt;&amp;lt;audio controls="controls"&gt;&lt;br /&gt;  &amp;lt;source src="song.ogg" type="audio/ogg" /&gt;&lt;br /&gt;&amp;lt;/audio&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Video example :&lt;br /&gt;&lt;div style="border: solid 1px #A9B7C6;background:#1AFA1F"&gt;&lt;br /&gt;&amp;lt;video width="320" height="240" controls="controls"&gt;&lt;br /&gt;  &amp;lt;source src="movie.mp4" type="video/mp4" /&gt;&lt;br /&gt;&amp;lt;/video&gt;&lt;br /&gt;&lt;/div&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-4558341184730171713?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=sllUGt8WB0c:iktQKkEm1PM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=sllUGt8WB0c:iktQKkEm1PM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=sllUGt8WB0c:iktQKkEm1PM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=sllUGt8WB0c:iktQKkEm1PM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/sllUGt8WB0c" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-12-01T17:35:45.895-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/12/html-5-media-elements-with-example.html</feedburner:origLink></item><item><title>Linking (including) an external CSS (style sheet) to a HTML page</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/N7EDUv8JPPw/linking-including-external-css-style.html</link><category>CSS</category><category>HTML</category><author>noreply@blogger.com (GS)</author><pubDate>Thu, 24 Nov 2011 09:07:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-2198262824385819272</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kqZnVnLuqSeD6uKxyFaqTzSiiUI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kqZnVnLuqSeD6uKxyFaqTzSiiUI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kqZnVnLuqSeD6uKxyFaqTzSiiUI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kqZnVnLuqSeD6uKxyFaqTzSiiUI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;An external style sheet can be linked to the page with a &amp;lt;link&amp;gt; tag. &lt;br /&gt;
&lt;br /&gt;
Example link tag which includes an external style sheet is as follows..&lt;br /&gt;
&lt;br /&gt;
&lt;div style="border: 1px solid rgb(0, 0, 0);"&gt;&amp;lt;link rel="stylesheet" type="text/css" href="xyz.css" /&amp;gt;&lt;/div&gt;&lt;br /&gt;
The advantage of doing this is that the same style sheet can be used in every page on your site. And the entire site's styling can be managed by changing just this one file.&lt;br /&gt;
&lt;br /&gt;
When the CSS is defined inside the html page, the css classes can be declared with in the &amp;lt;style&amp;gt; tags, but we do not put &amp;lt;style&amp;gt; tags inside an external style sheet.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-2198262824385819272?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=N7EDUv8JPPw:x8EIVTnuHLo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=N7EDUv8JPPw:x8EIVTnuHLo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=N7EDUv8JPPw:x8EIVTnuHLo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=N7EDUv8JPPw:x8EIVTnuHLo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/N7EDUv8JPPw" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-24T09:07:58.623-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/linking-including-external-css-style.html</feedburner:origLink></item><item><title>What is CSS? Where is CSS Used? and an example HTML that uses CSS</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/GNmma1DwWY4/what-is-css-where-is-css-used-and.html</link><category>CSS</category><category>HTML</category><author>noreply@blogger.com (GS)</author><pubDate>Thu, 24 Nov 2011 08:57:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-3421880959556273259</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gUpHIkLVuv78XxOLTOm79E8xknQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gUpHIkLVuv78XxOLTOm79E8xknQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gUpHIkLVuv78XxOLTOm79E8xknQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gUpHIkLVuv78XxOLTOm79E8xknQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;CSS is nothing but Cascading Style Sheets, these are used to separate the content from design of the HTML page, so that in future if we want to change the design and layout of the HTML page, without disturbing the content, it will become any easy job. That is we can change the layout / design by simply modifying the CSS.&lt;br /&gt;
&lt;br /&gt;
The CSS can be declared with in the html file or in a separate CSS file.&lt;br /&gt;
&lt;br /&gt;
The structure of the simple CSS is as follows,&lt;br /&gt;
&lt;br /&gt;
&lt;div style="border: 1px solid rgb(0, 0, 0);"&gt;.leftcol&lt;br /&gt;
{&lt;br /&gt;
float: left;&lt;br /&gt;
width: 33%;&lt;br /&gt;
background:#908800;&lt;br /&gt;
}&lt;br /&gt;
.middlecol&lt;br /&gt;
{&lt;br /&gt;
float: left;&lt;br /&gt;
width: 34%;&lt;br /&gt;
background:#effefe;&lt;br /&gt;
}&lt;br /&gt;
.rightcol&lt;br /&gt;
{&lt;br /&gt;
float:left;&lt;br /&gt;
width: 33%;&lt;br /&gt;
background:#dddd11;&lt;br /&gt;
}&lt;/div&gt;&lt;br /&gt;
In the above example the "leftcol","middlecol","rightcol" are the css class names, which defines its own styling, these classes need to be applied on the HTML elements to see these styling effects.&lt;br /&gt;
&lt;br /&gt;
simple html that uses the above declared css class&lt;br /&gt;
&lt;br /&gt;
&lt;div style="border: 1px solid rgb(0, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;style type=​"text/​css"&amp;gt;&lt;br /&gt;
.leftcol&lt;br /&gt;
{&lt;br /&gt;
float: left;&lt;br /&gt;
width: 33%;&lt;br /&gt;
background:#908800;&lt;br /&gt;
}&lt;br /&gt;
.middlecol&lt;br /&gt;
{&lt;br /&gt;
float: left;&lt;br /&gt;
width: 34%;&lt;br /&gt;
background:#effefe;&lt;br /&gt;
}&lt;br /&gt;
.rightcol&lt;br /&gt;
{&lt;br /&gt;
float:left;&lt;br /&gt;
width: 33%;&lt;br /&gt;
background:#dddd11;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class="leftcol"&amp;gt;this is a left div ...&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class="middlecol"&amp;gt;this is a middle div ...&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class="rightcol"&amp;gt;this is a right div ...&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-3421880959556273259?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=GNmma1DwWY4:-1J4QV-hx_A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=GNmma1DwWY4:-1J4QV-hx_A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=GNmma1DwWY4:-1J4QV-hx_A:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=GNmma1DwWY4:-1J4QV-hx_A:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/GNmma1DwWY4" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-24T08:57:59.179-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-is-css-where-is-css-used-and.html</feedburner:origLink></item><item><title>What is the difference between Dojo and jQuery</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/44b45DpCr-I/what-is-difference-between-dojo-and.html</link><category>JavaScript</category><category>JQuery</category><category>DOJO</category><author>noreply@blogger.com (GS)</author><pubDate>Thu, 24 Nov 2011 08:53:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-9030586738361722224</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZVdEOi1wg8SkS3biKqzG0cczqnA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZVdEOi1wg8SkS3biKqzG0cczqnA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZVdEOi1wg8SkS3biKqzG0cczqnA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZVdEOi1wg8SkS3biKqzG0cczqnA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, default; font-size: 13px; line-height: 17px; "&gt;jQuery is a JavaScript Library that simplifies HTML document traversing(DOM &lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, default; font-size: 13px; line-height: 17px; "&gt;manipulation&lt;/span&gt;), event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, default; font-size: 13px; line-height: 17px; "&gt;Dojo is a more comprehensive toolkit that offers the above features, but also includes many other pieces that facilitate building rich web applications&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-9030586738361722224?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=44b45DpCr-I:NMEdW9zW5Q8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=44b45DpCr-I:NMEdW9zW5Q8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=44b45DpCr-I:NMEdW9zW5Q8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=44b45DpCr-I:NMEdW9zW5Q8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/44b45DpCr-I" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-24T08:55:29.538-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-is-difference-between-dojo-and.html</feedburner:origLink></item><item><title>Simple SAX parser example (count number of elements in an xml file)</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/45uF3NuD8jg/simple-sax-parser-example-count-number.html</link><category>Java</category><category>sax</category><category>xml</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:37:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-1687854721168498256</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PrIHOarSbF_nS7sP2DsJMKAH1gQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PrIHOarSbF_nS7sP2DsJMKAH1gQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PrIHOarSbF_nS7sP2DsJMKAH1gQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PrIHOarSbF_nS7sP2DsJMKAH1gQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;b&gt;Example Xml File :&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version = "1.0" ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Employees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Id&amp;gt; 1 &amp;lt;/Emp_Id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Name&amp;gt; Bob &amp;lt;/Emp_Name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_E-mail&amp;gt; bob@hotmail.com &amp;lt;/Emp_E-mail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Id&amp;gt; 2 &amp;lt;/Emp_Id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Name&amp;gt; Nick &amp;lt;/Emp_Name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_E-mail&amp;gt; nick@yahoo.com &amp;lt;/Emp_E-mail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Id&amp;gt; 3 &amp;lt;/Emp_Id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_Name&amp;gt; John &amp;lt;/Emp_Name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Emp_E-mail&amp;gt; john@gmail.com &amp;lt;/Emp_E-mail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Employee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Employees&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;b&gt;Java code to parse the above xml file and provides the elements count&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;import javax.xml.parsers.*;&lt;br /&gt;
import org.xml.sax.*;&lt;br /&gt;
import org.xml.sax.helpers.*;&lt;br /&gt;
import java.io.*;&lt;br /&gt;
&lt;br /&gt;
public class ElementCount{ &lt;br /&gt;
int startTag = 0;&lt;br /&gt;
public static String ele;&lt;br /&gt;
public static void main(String args[])throws IOException {&lt;br /&gt;
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
System.out.print("Enter XML file name:");&lt;br /&gt;
String xmlFile = bf.readLine();&lt;br /&gt;
File file = new File(xmlFile);&lt;br /&gt;
if (file.exists()){&lt;br /&gt;
System.out.print("Enter tag name for which the count should be calculated:");&lt;br /&gt;
ele = bf.readLine();&lt;br /&gt;
ElementCount tagCount = new ElementCount(xmlFile);&lt;br /&gt;
}&lt;br /&gt;
else{&lt;br /&gt;
System.out.println("File not found!");&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public ElementCount(String str){&lt;br /&gt;
try{&lt;br /&gt;
SAXParserFactory parserFact = SAXParserFactory.newInstance();&lt;br /&gt;
SAXParser parser = parserFact.newSAXParser();&lt;br /&gt;
DefaultHandler dHandler = new DefaultHandler(){&lt;br /&gt;
public void startElement(String uri, String name, String element,&lt;br /&gt;
Attributes atri)throws SAXException{&lt;br /&gt;
if (element.equals(ele)){&lt;br /&gt;
startTag++;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public void endDocument(){&lt;br /&gt;
System.out.println("Total elements: " + startTag);&lt;br /&gt;
}&lt;br /&gt;
};&lt;br /&gt;
parser.parse(str,dHandler);&lt;br /&gt;
}&lt;br /&gt;
catch (Exception e){&lt;br /&gt;
e.printStackTrace();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-1687854721168498256?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=45uF3NuD8jg:nGKRA3QeLk4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=45uF3NuD8jg:nGKRA3QeLk4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=45uF3NuD8jg:nGKRA3QeLk4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=45uF3NuD8jg:nGKRA3QeLk4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/45uF3NuD8jg" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:37:06.216-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/simple-sax-parser-example-count-number.html</feedburner:origLink></item><item><title>What is a constructor and difference between this and super</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/VyxVQ8QT8Vw/what-is-constructor-and-difference.html</link><category>Java</category><category>Core Java</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:34:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-5284812507213059938</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Oxv4TzAiYi_voinAFaXFoX5pHBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Oxv4TzAiYi_voinAFaXFoX5pHBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Oxv4TzAiYi_voinAFaXFoX5pHBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Oxv4TzAiYi_voinAFaXFoX5pHBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align="left" style="font-size: 12px; line-height: 12px; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; line-height: 18pt; margin-bottom: 9pt; margin-left: 0in; margin-right: 0in; margin-top: 9pt;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;A constructor is a special type of function that gets called every time you initialize a class&lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;, constructor has the same name as class name. Constructor has no return type not even void. We can pass the parameters to the constructor. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; line-height: 18pt; margin-bottom: 9pt; margin-left: 0in; margin-right: 0in; margin-top: 9pt;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;-this() is used to invoke a constructor of the same class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; line-height: 18pt; margin-bottom: 9pt; margin-left: 0in; margin-right: 0in; margin-top: 9pt;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;-super() is used to invoke a super class constructor. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; line-height: 18pt; margin-bottom: 9pt; margin-left: 0in; margin-right: 0in; margin-top: 9pt;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;Constructor is called immediately after the object is created before the new operator completes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; line-height: 18pt; margin-bottom: 9pt; margin-left: 0in; margin-right: 0in; margin-top: 9pt;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;For example, say you have this class called Person: &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;class Person &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;{ &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;public Person () &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;{ &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;Console.WriteLine("We're making a new person"); &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;Now you can create a new object of type Person, like this: &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;Person Tim= new person(); &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;The program will write the line "We're making a new person" to the screen. &lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 18pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;/div&gt;&lt;ul style="font-family: Verdana, sans-serif;"&gt;&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;Constructor can use the access modifiers public, protected, private or have no access modifier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;Constructor can not use the modifiers abstract, static, final, native, synchronized or strictfp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-family: Verdana; font-size: 9pt;"&gt;Constructor can be overloaded, we cannot override.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;You cannot use this() and Super() in the same constructor.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana;"&gt;You can not have both super() and this() invocation in the same constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana;"&gt;Either super() or this() should be the first statement in the constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="MsoNormal" style="font-family: Verdana, sans-serif;"&gt;&lt;span style="background-color: white; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Verdana; font-size: 9pt;"&gt;&lt;o:p&gt;&lt;b&gt; &lt;/b&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-5284812507213059938?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=VyxVQ8QT8Vw:glhFhPDNQL4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=VyxVQ8QT8Vw:glhFhPDNQL4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=VyxVQ8QT8Vw:glhFhPDNQL4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=VyxVQ8QT8Vw:glhFhPDNQL4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/VyxVQ8QT8Vw" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:34:10.985-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-is-constructor-and-difference.html</feedburner:origLink></item><item><title>What is the difference between SAX and DOM parsers?</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/3qs43zvc26E/what-is-difference-between-sax-and-dom.html</link><category>Java</category><category>dom</category><category>sax</category><category>xml</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:31:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-8365616134626948991</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KGQ3pyoTGo-ArdFRk-vFrzzjCXE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KGQ3pyoTGo-ArdFRk-vFrzzjCXE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KGQ3pyoTGo-ArdFRk-vFrzzjCXE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KGQ3pyoTGo-ArdFRk-vFrzzjCXE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 1.5em; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="color: black; font-family: Arial, Bold; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DOM Parser:&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: white; color: #666666; margin-bottom: 12px; margin-left: 0.25in; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -0.25in;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;A DOM (Document Object Model) parser creates a tree structure in memory from an input document and then waits for requests from client.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;A DOM parser always serves the client application with the entire document no matter how much is actually needed by the client.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;A DOM parser is rich in functionality. It creates a DOM tree in memory and allows you to access any part of the document repeatedly and allows you to modify the DOM tree. But it is space inefficient when the document is huge, and it takes a little bit longer to learn how to work with it.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="MsoNormal" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 1.5em; margin-bottom: 12px; margin-left: 0.25in; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -0.25in;"&gt;&lt;strong style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;SAX Parser:&lt;/strong&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: white; color: #666666; margin-bottom: 12px; margin-left: 0.25in; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -0.25in;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 12px; margin-left: 0.25in; margin-right: 0px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -0.25in;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;A SAX (&lt;/span&gt;&lt;strong style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-weight: bold; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;S&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;imple &lt;/span&gt;&lt;strong style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-weight: bold; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;PI for &lt;/span&gt;&lt;strong style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-weight: bold; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;X&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;ML) parser does not create any internal structure. Instead, it takes the occurrences of components of an input document &lt;/span&gt;&lt;strong style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-weight: bold; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;as events&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;, and tells the client what it reads as it reads through the input document.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;A SAX parser serves the client application always only with pieces of the document at any given time.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;A SAX parser, however, is much more space efficient in case of a big input document (because it creates no internal structure). What’s more, it runs faster and is easier to learn than DOM parser because its API is really simple. But from the functionality point of view, it provides a fewer functions, which means that the users themselves have to take care of more, such as creating their own data structures.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-8365616134626948991?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=3qs43zvc26E:71Ba9VizIq0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=3qs43zvc26E:71Ba9VizIq0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=3qs43zvc26E:71Ba9VizIq0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=3qs43zvc26E:71Ba9VizIq0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/3qs43zvc26E" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:38:02.484-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-is-difference-between-sax-and-dom.html</feedburner:origLink></item><item><title>What are the differences between finalize(), final and finally</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/39xmGTKl6Oo/what-are-differences-between-finalize.html</link><category>Java</category><category>Core Java</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:30:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-7208152676197385813</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yV3DCNbc6zb979wQSyzxznaHBEU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yV3DCNbc6zb979wQSyzxznaHBEU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yV3DCNbc6zb979wQSyzxznaHBEU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yV3DCNbc6zb979wQSyzxznaHBEU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;ul style="background-color: white; margin: 12px 0px; padding: 0px 0px 0px 40px;"&gt;&lt;li style="color: #666666; font-family: 'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif; font-size: 12px; margin: 0px; padding: 0px;"&gt;&lt;strong style="font-weight: bold; margin: 0px; padding: 0px;"&gt;finalize()&lt;/strong&gt; – method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state. Should not be used to release non-memory resources like file handles, sockets, database connections etc because Java has only a finite number of these resources and you do not know when the garbage collection is going to kick in to release these non-memory resources through the finalize() method.&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li style="color: #666666; font-family: 'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif; font-size: 12px; margin: 0px; padding: 0px;"&gt;&lt;strong style="font-weight: bold; margin: 0px; padding: 0px;"&gt;finally&lt;/strong&gt; – The finally block &lt;em style="margin: 0px; padding: 0px;"&gt;always&lt;/em&gt; executes when the try block exits, except System.exit(0) call. This ensures that the finally block is executed even if an unexpected exception occurs. It allows the programmer to avoid having clean up code accidentally bypassed by a return, continue, or break. Keeping the clean up code in a finally block is always a good practice, even when no exceptions are anticipated.&lt;/li&gt;
&lt;li style="color: #666666; font-family: 'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif; font-size: 12px; margin: 0px; padding: 0px;"&gt;&lt;strong style="font-weight: bold; margin: 0px; padding: 0px;"&gt;final&lt;/strong&gt; – This is useful in several ways...&lt;/li&gt;
&lt;/ul&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;When it is used with variable declaration, it becomes constant&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;When it is used with method, the method cant be &lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px;"&gt;overridden&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px;"&gt; by the child class&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;When it is used with the class, the class cant have child classes.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-7208152676197385813?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=39xmGTKl6Oo:qxDLxuZ_hGM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=39xmGTKl6Oo:qxDLxuZ_hGM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=39xmGTKl6Oo:qxDLxuZ_hGM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=39xmGTKl6Oo:qxDLxuZ_hGM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/39xmGTKl6Oo" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:30:38.386-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-are-differences-between-finalize.html</feedburner:origLink></item><item><title>What are the differences between HashMap and Hashtable?</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/IJStfngbvnc/what-are-differences-between-hashmap.html</link><category>Java</category><category>Core Java</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:29:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-6262902481313153385</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mGLSNHZbHBk56NDhO7GEnfyNFsc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mGLSNHZbHBk56NDhO7GEnfyNFsc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mGLSNHZbHBk56NDhO7GEnfyNFsc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mGLSNHZbHBk56NDhO7GEnfyNFsc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Verdana, Arial, Helvetica;"&gt;Both  provide key-value access to data. The Hashtable is one of the original  collection classes in Java. HashMap is part of the new Collections  Framework, added with Java 2, v1.2.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: white; font-family: Verdana,Arial,Helvetica; font-size: small;"&gt;The  key difference between the two is that access to the Hashtable is  synchronized on the table while access to the HashMap isn't. You can add  it, but it isn't there by default.&lt;/div&gt;&lt;div style="background-color: white; font-family: Verdana,Arial,Helvetica; font-size: small;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: white; font-family: Verdana,Arial,Helvetica; font-size: small;"&gt;Another  difference is that iterator in the HashMap is fail-safe while the  enumerator for the Hashtable isn't. If you change the map while  iterating, you'll know.&lt;/div&gt;&lt;div style="background-color: white; font-family: Verdana,Arial,Helvetica; font-size: small;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: white; font-family: Verdana,Arial,Helvetica; font-size: small;"&gt;And, a third difference is that HashMap permits null values in it, while Hashtable doesn't.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-6262902481313153385?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=IJStfngbvnc:a46vqqBaQhI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=IJStfngbvnc:a46vqqBaQhI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=IJStfngbvnc:a46vqqBaQhI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=IJStfngbvnc:a46vqqBaQhI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/IJStfngbvnc" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:29:15.626-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/what-are-differences-between-hashmap.html</feedburner:origLink></item><item><title>Synchronizing a HashMap</title><link>http://feedproxy.google.com/~r/JavaTechPage4u/~3/kEXjwSnuEkE/synchronizing-hashmap.html</link><category>Java</category><category>Core Java</category><author>noreply@blogger.com (GS)</author><pubDate>Mon, 21 Nov 2011 06:27:00 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5732959929032431013.post-2860946921588215288</guid><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/t4Gc3Lxm-bMBMPkMphxlC5l3Zhc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t4Gc3Lxm-bMBMPkMphxlC5l3Zhc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/t4Gc3Lxm-bMBMPkMphxlC5l3Zhc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t4Gc3Lxm-bMBMPkMphxlC5l3Zhc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
How to make hashmap operations synchronized?&lt;br /&gt;
&lt;br /&gt;
For JDK 5 or after, we can use ConcurrentHashMap . This is an efficient implementation of a concurrent hash map using different locks for different portions of the HashMap . This reduces the contention of the lock and hence increase throughput tremendously as compared to a synchronized Map.&lt;br /&gt;
&lt;br /&gt;
For JDK versions before JDK5 there is a back port &amp;nbsp;of the same, if we do not want to use that, then we can use Collections.synchronizedMap() method to create a synchronized map. The new map will be backed with the original map and all the access will be synchronized on a single monitor. Also, we have to do external synchronization while iterating over the map entries.&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
amazon_ad_tag = "jatepa4u-20"; amazon_ad_width = "728"; amazon_ad_height = "90";//--&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"&gt;&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5732959929032431013-2860946921588215288?l=javatechpage.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=kEXjwSnuEkE:cjwdkYV_CtQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=kEXjwSnuEkE:cjwdkYV_CtQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/JavaTechPage4u?a=kEXjwSnuEkE:cjwdkYV_CtQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JavaTechPage4u?i=kEXjwSnuEkE:cjwdkYV_CtQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JavaTechPage4u/~4/kEXjwSnuEkE" height="1" width="1"/&gt;</description><atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2011-11-21T06:27:11.316-08:00</atom:updated><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://javatechpage.blogspot.com/2011/11/synchronizing-hashmap.html</feedburner:origLink></item></channel></rss>

