<?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>miya&#039;s Java notes</title>
	<atom:link href="http://myjavanotes.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://myjavanotes.wordpress.com</link>
	<description>Some notes about  the Java programming language</description>
	<lastBuildDate>Sat, 17 Apr 2010 18:31:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='myjavanotes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>miya&#039;s Java notes</title>
		<link>http://myjavanotes.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://myjavanotes.wordpress.com/osd.xml" title="miya&#039;s Java notes" />
	<atom:link rel='hub' href='http://myjavanotes.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Inner classes.</title>
		<link>http://myjavanotes.wordpress.com/2010/04/17/inner-classes/</link>
		<comments>http://myjavanotes.wordpress.com/2010/04/17/inner-classes/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 18:31:25 +0000</pubDate>
		<dc:creator>nmiyasato</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[inner classes]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://myjavanotes.wordpress.com/?p=15</guid>
		<description><![CDATA[Why are they usefull? I would say that I would use them just to let the next programmer know that I only intend this classes to be used in this particular class and in no other place. Just like that. I was working on some project and we had to deal with using the RaphaelGWT [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=myjavanotes.wordpress.com&amp;blog=4839085&amp;post=15&amp;subd=myjavanotes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Why are they usefull?</p>
<p>I would say that I would use them just to let the next programmer know that I only intend this classes to be used in this particular class and in no other place. Just like that.</p>
<p>I was working on some project and we had to deal with using the RaphaelGWT port of RaphaelJS.</p>
<p>We stumbled upon they were a lot of inner classes. Have a look at this snippet of the code:</p>
<p><pre class="brush: java;">
package com.hydro4ge.raphaelgwt.client;

import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Widget;
import java.util.ArrayList;

public class Raphael extends Widget {

    private RaphaelJS overlay;
    private final ArrayList shapes = new ArrayList();

    public Raphael(int width, int height) {
        super();
        Element raphaelDiv = DOM.createDiv();
        setElement(raphaelDiv);
        overlay = RaphaelJS.create(raphaelDiv, width, height);
    }

    public class Shape extends Widget {
    }

    public class Circle extends Shape {
    }

    public class Text extends Shape {
    }

    public class Rect extends Shape {
    }

    public class Ellipse extends Shape {
    }

    public class Image extends Shape {
    }

    public class Path extends Shape {
    }
}
</pre></p>
<p>That code was taken from <a href="http://code.google.com/p/raphaelgwt/source/browse/trunk/src/com/hydro4ge/raphaelgwt/client/Raphael.java">RaphaelGWT</a> repository.</p>
<p>The thing is that those classes are used within that same class, over and over again, and nowhere else. So basically, from this particular class, I can say that if we have to use some classes that are really part of the containing class and will never ever be used outside of it, we should just create it as an inner class. </p>
<p>I still have to check (actually i should just google for it and that&#8217;s it) what the scope of things are for those inner classes and the containing class&#8230; I mean, can the inner class methods view the private attributes of the container class?<br />
Why? Why not?</p>
<p>How about inheritance and all that stuff?</p>
<p>Well, surely it&#8217;s a long subject.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/myjavanotes.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/myjavanotes.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/myjavanotes.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=myjavanotes.wordpress.com&amp;blog=4839085&amp;post=15&amp;subd=myjavanotes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://myjavanotes.wordpress.com/2010/04/17/inner-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/313a517a47d3bcf4091e397204facec9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">miya</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world and some interesting stuff</title>
		<link>http://myjavanotes.wordpress.com/2008/12/11/hello-world-and-some-interesting-stuff/</link>
		<comments>http://myjavanotes.wordpress.com/2008/12/11/hello-world-and-some-interesting-stuff/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 03:37:13 +0000</pubDate>
		<dc:creator>nmiyasato</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[enumeration]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://myjavanotes.wordpress.com/?p=5</guid>
		<description><![CDATA[Some interesting things in this simple example Everything has to be in a class The first thing I noticed is that everything has to be in a class, even for something as easy and straighforward as the &#8220;Hello world!&#8221; mandatory example. Actually not everything has to be in a class (yeah, I&#8217;m a contradicting man). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=myjavanotes.wordpress.com&amp;blog=4839085&amp;post=5&amp;subd=myjavanotes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><pre class="brush: java;">

public class Hello {
  public static void main(String args[]) {
    System.out.println(&quot;Hello world!&quot;)
  }
}
</pre></pre>
<h3>Some interesting things in this simple example</h3>
<h4>Everything has to be in a class</h4>
<p>The first thing I noticed is that everything has to be in a class, even for something as easy and straighforward as the &#8220;Hello world!&#8221; mandatory example.</p>
<p>Actually not everything has to be in a class (yeah, I&#8217;m a contradicting man). Enumerations are, I think, the only thing that dont, however, if you look at them reaaaally closely, you&#8217;ll see that they are, more or less, like classes. I suppose I&#8217;ll talk/write about this in the near future</p>
<h4>There has to be a main method</h4>
<p>If you want to execute the example, be sure you have a <b>main</b> method, and that it accepts an array of arguments. This might sound pretty stupid for people that already know that language, but in Python for example, you don&#8217;t have this constraint.</p>
<h4>There are some packages that are always at hand</h4>
<p>There is no need to import the System package. I think that there are some other packages that are always at hand.</p>
<p>So many things in just a couple of lines&#8230;</p>
<p>cya!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/myjavanotes.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/myjavanotes.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/myjavanotes.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=myjavanotes.wordpress.com&amp;blog=4839085&amp;post=5&amp;subd=myjavanotes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://myjavanotes.wordpress.com/2008/12/11/hello-world-and-some-interesting-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/313a517a47d3bcf4091e397204facec9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">miya</media:title>
		</media:content>
	</item>
	</channel>
</rss>
