<?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>Java Interview Questions &#187; Anonymous inner class</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/java-interview-questions/anonymous-inner-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What is Anonymous Inner Class</title>
		<link>http://www.bestjavainterviewquestions.com/what-is-anonymous-inner-class/</link>
		<comments>http://www.bestjavainterviewquestions.com/what-is-anonymous-inner-class/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 19:22:45 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[Anonymous inner class]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=466</guid>
		<description><![CDATA[anonymous inner class It is an inner class whose name is hidden in the outer class and for which only one object is created. An inner class is where you define one class within another. You might do this where one class is tightly coupled to another class and there is no point in defining [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong>anonymous inner class</strong></span></p>
<p>It is an inner class whose name is hidden in the outer class and for which only one object is created. <span id="intelliTxt">An inner class is where you define one class within another. You might do this where one class is tightly coupled to another class and there is no point in defining a new class.</span></p>
<p><strong>A Sample example of inner class</strong></p>
<p><em><span id="intelliTxt">// Outer.java<br />
public class Outer {<br />
Outer() {<br />
Inner i = new Inner();<br />
i.innerMethod();<br />
}</p>
<p>// Inner class<br />
private class Inner {<br />
Inner() {}</p>
<p>public void innerMethod() {<br />
// Do something.<br />
}<br />
}<br />
}</span></em></p>
<p><em><span id="intelliTxt">Note: An inner class is a non-static nested class. It has access to all of the variables and methods of its outer class and may refer to them directly in the same way that other non-static members of the outer class do.  Thus , an inner class is fully with in the scope of its enclosing class.<br />
</span></em></p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li>August 24, 2008 -- <a href="http://www.bestjavainterviewquestions.com/define-local-interfaces/" title="Define Local Interfaces">Define Local Interfaces</a> (0)</li><li>April 5, 2009 -- <a href="http://www.bestjavainterviewquestions.com/how-to-get-a-leap-year/" title="How to get a Leap Year">How to get a Leap Year</a> (0)</li><li>June 25, 2008 -- <a href="http://www.bestjavainterviewquestions.com/jdbc-interview-questions-2/" title="Jdbc Interview Questions">Jdbc Interview Questions</a> (0)</li><li>October 4, 2008 -- <a href="http://www.bestjavainterviewquestions.com/what-is-jtapi/" title="What is JTAPI">What is JTAPI</a> (0)</li><li>July 21, 2008 -- <a href="http://www.bestjavainterviewquestions.com/swings-interview-questions/" title="Swings Interview Questions">Swings Interview Questions</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/what-is-anonymous-inner-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

