<?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>TechieDrill &#187; Variables</title>
	<atom:link href="http://techiedrill.com/tag/variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://techiedrill.com</link>
	<description>Your World Of Technical Tutorials</description>
	<lastBuildDate>Tue, 05 Jan 2010 16:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Understanding Java Static block/variables/method</title>
		<link>http://techiedrill.com/2009/11/understanding-java-static-blockvariablesmethod/</link>
		<comments>http://techiedrill.com/2009/11/understanding-java-static-blockvariablesmethod/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 18:18:51 +0000</pubDate>
		<dc:creator>karnamrajesh</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://techiedrill.com/?p=433</guid>
		<description><![CDATA[lass UseStatic
{
 static int a=3;
 static int b;
 static void meth(int x)
 {
 System.out.println(&#8221;x: &#8220;+x);
 System.out.println(&#8221;a: &#8220;+a);
 System.out.println(&#8221;b: &#8220;+b);
 }
 static
 {
 System.out.println(&#8221;static block initialized: &#8220;);
 b=a*4;
 }
 public static void main(String [] args)
 {
 meth(42);
 }
}
Static block/variables/methods are very powerful in java.
When we say static it is static throughout the application. If you declare [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><em>lass UseStatic</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><em>{</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>static int a=3;</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>static int b;</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>static void meth(int x)</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>{</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>System.out.println(&#8221;x: &#8220;+x);</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>System.out.println(&#8221;a: &#8220;+a);</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>System.out.println(&#8221;b: &#8220;+b);</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>}</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>static</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>{</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>System.out.println(&#8221;static block initialized: &#8220;);</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>b=a*4;</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>}</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>public static void main(String [] args)</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>{</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>meth(42);</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"><em> </em></span><em>}</em></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><em>}</em></div>
<p><strong>Static block/variables/methods are very powerful in java.</strong></p>
<p>When we say static it is static throughout the application. If you declare a static variable in a stand-alone application, the life of the variable will be throughout the end of the application but in the case of the web application, static variable  has life till the web server is stopped.</p>
<p>Static variables are executed at first the program runs. Next the static block is executed. Static methods are executed when a call is raised.</p>
<p><em>Note: Static methods can call only static methods. To call non-static methods instance of the class should be created</em></p>
<p><strong>Refer below code for better understanding</strong></p>
<p><em>class UseStatic</em></p>
<p><em>{</em></p>
<p><span style="white-space:pre"><em> </em></span><em>static int a=3;</em></p>
<p><span style="white-space:pre"><em> </em></span><em>static int b;</em></p>
<p><em><br />
</em></p>
<p><span style="white-space:pre"><em> </em></span><em>static void meth(int x)</em></p>
<p><span style="white-space:pre"><em> </em></span><em>{</em></p>
<p><span style="white-space:pre"><em> </em></span><em>System.out.println(&#8221;x: &#8220;+x);</em></p>
<p><span style="white-space:pre"><em> </em></span><em>System.out.println(&#8221;a: &#8220;+a);</em></p>
<p><span style="white-space:pre"><em> </em></span><em>System.out.println(&#8221;b: &#8220;+b);</em></p>
<p><span style="white-space:pre"><em> </em></span><em>}</em></p>
<p><span style="white-space:pre"><em> </em></span><em>static</em></p>
<p><span style="white-space:pre"><em> </em></span><em>{</em></p>
<p><span style="white-space:pre"><em> </em></span><em>System.out.println(&#8221;static block initialized: &#8220;);</em></p>
<p><span style="white-space:pre"><em> </em></span><em>b=a*4;</em></p>
<p><span style="white-space:pre"><em> </em></span><em>}</em></p>
<p><span style="white-space:pre"><em> </em></span><em>public static void main(String [] args)</em></p>
<p><span style="white-space:pre"><em> </em></span><em>{</em></p>
<p><span style="white-space:pre"><em> </em></span><em>meth(42);</em></p>
<p><span style="white-space:pre"><em> </em></span><em>}</em></p>
<p><em>}</em></p>
]]></content:encoded>
			<wfw:commentRss>http://techiedrill.com/2009/11/understanding-java-static-blockvariablesmethod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Tutorial &#8211; 4 &#8211; More on Variables</title>
		<link>http://techiedrill.com/2009/11/javascript-tutorial-more-on-variables/</link>
		<comments>http://techiedrill.com/2009/11/javascript-tutorial-more-on-variables/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:46:50 +0000</pubDate>
		<dc:creator>Venkatesh Viswanathan</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Javascript Tutorial]]></category>
		<category><![CDATA[More]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://techiedrill.com/?p=77</guid>
		<description><![CDATA[
To download this you tube video, Click Here
Tutorial More on Variables.
Welcome to the fourth JavaScript tutorial.In this tutorial I&#8217;m going to be teaching you how to change variables and use variables in equations. So lets go ahead and start out with variables. Remember to declare a variable you type the variable and then type whatever [...]]]></description>
			<content:encoded><![CDATA[<p><object width="445" height="364"><param name="movie" value="http://www.youtube.com/v/yBncmrsVED0&#038;hl=en&#038;fs=1&#038;color1=0x234900&#038;color2=0x4e9e00&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yBncmrsVED0&#038;hl=en&#038;fs=1&#038;color1=0x234900&#038;color2=0x4e9e00&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed></object></p>
<p>To download this you tube video, <a href="http://www.keephd.com/watch?v=yBncmrsVED0">Click Here</a></p>
<p><strong>Tutorial More on Variables.</strong></p>
<p>Welcome to the fourth JavaScript tutorial.In this tutorial I&#8217;m going to be teaching you how to change variables and use variables in equations. So lets go ahead and start out with variables. Remember to declare a variable you type the variable and then type whatever you want, Say name and set the value equal to Tony<br />
<strong>var name=&#8221;Tony&#8221;;</strong><br />
Whenever you want an output on screen you can use an alert syntax.<br />
<strong>var name=&#8221;Tony&#8221;;<br />
alert(name);</strong><br />
And what if you typed is wrong and you decided that you want to have a new value for the variable name. Well since you have already declared it you don&#8217;t need to type the var again since you already did it. You just have to type name and is equal to whatever else you want, Say name equal to Bob<br />
<strong>name=&#8221;bob&#8221;;</strong><br />
Now since JavaScript is reading top to bottom, we got a variable name and is equal to tony. Now we are going to spit that out.&#8217;<br />
Say the var name should be changed to name equal to Bob.<br />
So from the step of name equal to Bob the alert will display the value of the name Bob.<br />
<strong>alert(name);</strong><br />
After this function you will first get the output as tony and then clicking the OK button you will get the output value as Bob.<br />
Ok now let me teach you one more thing in this tutorial that you can also use variables in variables.<br />
Say we have variable name num1 which stands for number1 which is equal to 30 then and we have an another variable named num2 and say is equal to 80. We can actually include variables in a variable. So I will make a variable called answer and I will set answer equals the variable 1 plus the variable 2. So now the answer has the value of 110. you can view it by making a alert box and you can alert the answer.<br />
<strong>var num1=30;<br />
var num2=80;<br />
var answer=(num1+num2);<br />
alert(answer);</strong><br />
You can change any of the two variables numbers and check out. Say if you change the num1 to 330 it automatically changes the answer to 410. Now you can see that if we change the value of the one variable it will change the whole instance.<br />
This is just to show you that how you can use variables in equations of another variables.<br />
Now try to make this, clear things up later on and in the next tutorial we will be taking about how you can actually get information from the user and is lot more useful than typing numbers. In next section we going to learn the first kind of useful thing you can do in JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://techiedrill.com/2009/11/javascript-tutorial-more-on-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Tutorial &#8211; 3 &#8211; Variables</title>
		<link>http://techiedrill.com/2009/11/javascript-tutorial-variables/</link>
		<comments>http://techiedrill.com/2009/11/javascript-tutorial-variables/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:43:10 +0000</pubDate>
		<dc:creator>Venkatesh Viswanathan</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Javascript Tutorial]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://techiedrill.com/?p=75</guid>
		<description><![CDATA[
To download this you tube video, Click Here
Tutorial on Variables.
Welcome to JavaScript tutorial. In this tutorial I&#8217;m going to go over variables. Now a variable in JavaScript is just a place order. For instance a variable could hold a long string of text or can hold a bunch of numbers or can hold an equation. [...]]]></description>
			<content:encoded><![CDATA[<p><object width="445" height="364"><param name="movie" value="http://www.youtube.com/v/YNVMy7NxBuo&#038;hl=en&#038;fs=1&#038;color1=0x234900&#038;color2=0x4e9e00&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YNVMy7NxBuo&#038;hl=en&#038;fs=1&#038;color1=0x234900&#038;color2=0x4e9e00&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed></object></p>
<p>To download this you tube video, <a href="http://www.keephd.com/watch?v=YNVMy7NxBuo">Click Here</a></p>
<p><strong>Tutorial on Variables.</strong></p>
<p>Welcome to JavaScript tutorial. In this tutorial I&#8217;m going to go over variables. Now a variable in JavaScript is just a place order. For instance a variable could hold a long string of text or can hold a bunch of numbers or can hold an equation. So the most basic variable we have is just a simple text variable and to do syntax of a variable we always start with the word var, this tells the javascript that we are going to be work with the variable next. So whatever we type next is going to be a variable. So if I want a variable named name, I have to type &#8220;var name&#8221; and whatever you want the name to be equal to you have to put a equal sign and enclose it in a quotation marks. I&#8217;m going to name as Tony Hoss<br />
<strong>var name =&#8221;Tony Hoss&#8221;;</strong><br />
And any time you type a name in the JavaScript its going to output the value Tony Hoss. So I need to show you guys, We will make a alert box and type the name right in between the alert box;<br />
<strong>var name =&#8221;Tony Hoss&#8221;;<br />
alert(name);</strong><br />
Now instead of just outputting the word name it is going to output Tony Hoss.<br />
Now besides from just name you can also output basic numbers. So say we have a variable named name and is equal to 14 and dont enclose the numbers in quotation marks.<br />
The variable name is now equal to 14.<br />
Besides just being able to use variables to store a little pieces of information you can also use it to store equations. For instance if we had the variable name and we want make an equation say 14+32*55/4. Now the variable name stores the value for whatever the result of 14+32*55/4 is. Javscript just calculates it and stores the value of whatever the word name is in there.<br />
<strong>var name =(14+32*55/4);<br />
alert(name);</strong><br />
So why is this useful?<br />
Its useful because instead of every time you want to type the whole long 14+32*55/4 equation and the rest of your code all you have to do is to type the word name and is equal to 14+32*55/4 equation. So say when you have used the var name in lot of places in your code and you want to change the equation, you really don&#8217;t want to go and change it in each place you can just change it in the var name so that it will be change automatically to all name used code and this saves you a bunch of time, and bunch of work. So just making a single equation or string of text and applying as many times as you can. So now that you have a basic understanding of variables and in the next tutorial we are going to learn more complex things that you can do it on more useful things.</p>
]]></content:encoded>
			<wfw:commentRss>http://techiedrill.com/2009/11/javascript-tutorial-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
