<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.6" -->
<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/"
	>

<channel>
	<title>Yoné Rocha Blog</title>
	<link>http://www.yonerocha.net</link>
	<description>Vuelvo a existir</description>
	<pubDate>Fri, 09 May 2008 13:45:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.6</generator>
	<language>en</language>
			<item>
		<title>Programación == Filosofía != Pornografía</title>
		<link>http://www.yonerocha.net/2006/04/01/programacion-filosofia-pornografia/</link>
		<comments>http://www.yonerocha.net/2006/04/01/programacion-filosofia-pornografia/#comments</comments>
		<pubDate>Sat, 01 Apr 2006 09:45:50 +0000</pubDate>
		<dc:creator>Crashman</dc:creator>
		
		<category>Programación</category>

		<category>Informática</category>

		<category>Java</category>

		<guid isPermaLink="false">http://www.yonerocha.com/?p=111</guid>
		<description><![CDATA[Ahora me ha dado por estudiar JAVA en plan animal palmero y después de estar unas horitas estudiando, JAVA se ha vuelto filosofía. El primero que entienda los conceptos que explicó a continuación que se de con un canto en los dientes y verá cuando la programación se convierte en filosofía.
Si tenemos la variable miembro [...]]]></description>
			<content:encoded><![CDATA[<p>Ahora me ha dado por estudiar JAVA en plan animal palmero y después de estar unas horitas estudiando, JAVA se ha vuelto filosofía. El primero que entienda los conceptos que explicó a continuación que se de con un canto en los dientes y verá cuando la programación se convierte en filosofía.</p>
<blockquote><p>Si tenemos la variable miembro X y tenemos un método donde uno de los argumentos también es X. Al se X, variable pasada por argumento, una variable local que coincide con la X variable miembro, la X del método pasada por argumento oculta a la anterior X de ámbito general al tener el mismo nombre. Es decir que si dentro del método utilizamos simplemente X estamos haciendo referencia al argumento del método y no a la variable miembro. Para solucionar el problema en un método no static podemos utilizar this para referirnos a la variable miembro.
</p></blockquote>
<p><a id="more-111"></a></p>
<div class="igBar"><span id="ljava-2"><a href="#" onclick="javascript:showPlainTxt('java-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-2">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span> Jodida<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">double</span> x; <span style="color: #808080; font-style: italic;">//variable miembro</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> metodo<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">double</span> x<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;x; <span style="color: #808080; font-style: italic;">//variable pasada por argumento</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">x</span>; <span style="color: #808080; font-style: italic;">//variable miembro</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">x</span> =x;<span style="color: #808080; font-style: italic;">//asignamos a la variable miembro el valor del argumento x</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Ahí  queda el dato, Manolo….¿Quien será el listo que lo coja?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yonerocha.net/2006/04/01/programacion-filosofia-pornografia/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
