<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.254.0.0%2F16</id>
	<title>IdeaWazaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.254.0.0%2F16"/>
	<link rel="alternate" type="text/html" href="https://ideawaza.com/wiki/Special:Contributions/70.254.0.0/16"/>
	<updated>2026-09-29T15:30:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://ideawaza.com/index.php?title=Green_fundraising&amp;diff=68214</id>
		<title>Green fundraising</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Green_fundraising&amp;diff=68214"/>
		<updated>2008-11-11T14:54:17Z</updated>

		<summary type="html">&lt;p&gt;70.254.179.146: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Green Fundraising&#039;&#039;&#039;&amp;lt;ref&amp;gt;&amp;quot;Wall Street Journal Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Businesses Emerge to Help School Fund-Raisers Go Green | publisher=The Wall Street Journal | url=http://sec.online.wsj.com/article/SB121607802464352547.html?mod=todays_us_marketplace |  }}is the process of soliciting and gathering [[money]] or donations through the sale of organic, all natural, or environmentall friendly items.  The green fundraising concept originated in 2007 and has become one of the fastest growing subsets of the fundraising industry.&lt;br /&gt;
&lt;br /&gt;
==Reasons for Green Fundraisers==&lt;br /&gt;
The inherent nature of fundraising is being changed as a result of changes within the fundraising industry, as well as the economic downturn, and the green movement that has been popularized since the mid 1990&#039;s. &lt;br /&gt;
&lt;br /&gt;
==Economic Downturn==&lt;br /&gt;
&lt;br /&gt;
The economic downturn of the latter part of the decade is leading to a number of changes in the fundraising world.  Organizations that typically host a catalogue or direct sell fundraiser, such as schools and churches, are having to face reduced funding.  With property values down as much as 30% in areas like Las Vegas&amp;lt;ref&amp;gt;&amp;quot;International Herald Tribune Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=U.S. house prices continue to decline | url=http://www.iht.com/articles/2008/09/30/business/usecon.php | publisher=International Herald Tribune  }}some cities are facing unprecedented budget shortfalls and schools budgets are being cut as a result.&amp;lt;ref&amp;gt;&amp;quot;Los Angeles Times Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Education Leaders Told To Brace For Big Budget Cuts| url=http://www.latimes.com/news/local/politics/cal/la-me-budget29-2008oct29,0,6236374.story | publisher=Los Angeles Times  }},&lt;br /&gt;
&lt;br /&gt;
On the other end, families that have been struggling to make payments on their mortgages are increasingly less likely to be willing to donate to organizations they may not be directly involved with&amp;lt;ref&amp;gt;&amp;quot;Northwest News and Weather Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Fundraising Becoming More Difficult | url=http://www.nwcn.com/business/stories/NW_100708WAB_charity_help_KS.ee50f453.html | publisher=Northwest News and Weather}}.&lt;br /&gt;
&lt;br /&gt;
==Changes for Fundraising Suppliers==&lt;br /&gt;
&lt;br /&gt;
Some major fundraising suppliers, specifically the chocolate manufacturers, have begun to notify distributors that they will no longer be supplying chocolate bars for fundraising beginning in the Spring Fundraising season of 2009.  Rising input costs &amp;lt;ref&amp;gt;&amp;quot;CBS4 Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Is Your Chocolate Fudged? | url=http://cbs4.com/food/chocolate.hershey.vegetable.2.852310.html | publisher=CBS4.com}}.&lt;br /&gt;
had previously forced a reduction in the size of the candy bars, but the manufacturers realized that further reductions would lead to a decrease in sales.  &lt;br /&gt;
&lt;br /&gt;
Many smaller fundraising product suppliers are also facing shortfalls and the real possibility of closure due to increasing costs and decreasing sales.  This may prove to be a major issue in early 2009 when the changes start to take effect.&lt;br /&gt;
&lt;br /&gt;
==Green Movement==&lt;br /&gt;
&lt;br /&gt;
With the founding of Earth Day on April 22nd 1968, the green movement was begun.  Today, the concept of greening up one&#039;s life is everywhere.  Auto manufacturers use it to advertise the latest fuel efficient automobiles.  Cleaning product companies are eschewing the earth friendliness of their cleaning supplies.  And talk of the greenest energy supplies has played a major roll in the discussions of the political races in 2008.&lt;br /&gt;
&lt;br /&gt;
With major corporations and the government both pouring vast resources into the green concept, people are more focused on the environment now than ever before.  &lt;br /&gt;
&lt;br /&gt;
==Types of Green Fundraisers==&lt;br /&gt;
&lt;br /&gt;
Organizations that want to focus on raising money and promoting a healthy environment have a number of options, all of which fall under the green fundraiser umbrella.&lt;br /&gt;
&lt;br /&gt;
===Plant Fundraisers===&lt;br /&gt;
&lt;br /&gt;
Arguably the most green fundraisers available are plant and seed kit fundraisers.  Fundraising organizations have many options from which to choose when it comes to plant and seed kit fundraisers.  They include:&lt;br /&gt;
&lt;br /&gt;
Flower Bulb Fundraisers&lt;br /&gt;
Flower Seed Fundraisers&lt;br /&gt;
Tree Seed Fundraisers&lt;br /&gt;
Live Tree Fundraisers&lt;br /&gt;
Vegetable Garden Fundraisers&lt;br /&gt;
Fruit Plant Fundraisers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Recycling Fundraisers===&lt;br /&gt;
&lt;br /&gt;
Recycling fundraisers are either fundraisers where an organization is paying to have used items turned in for recycling, such as dead batteries or old cellur phones, or where a group is selling an item made from recycled materials.  &lt;br /&gt;
&lt;br /&gt;
===Organic Product Fundraisers===&lt;br /&gt;
&lt;br /&gt;
In 2003, the state of Texas banned the sale of unhealthy foods such as candy and cookie dough on public school campuses during school hours.&amp;lt;ref&amp;gt;&amp;quot;LA Times Article&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Sale of Junk Food at School Banned | url=http://www.cnr.berkeley.edu/cwh/PDFs/news/junk_food_banned_LA_Times_10-29-03.pdf | publisher=Los Angeles Times}}.  As a result, some companies &amp;lt;ref&amp;gt;&amp;quot;Go Green Fundraising&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Healthy Food Fundraiser | url=http://www.go-green-fundraising.com/healthy-creations-food-fundraisers}} began offering schools the option of selling healthy food items for fundraisers. &lt;br /&gt;
&lt;br /&gt;
Other organic product fundraisers include fair trade coffee fundraisers, organic candle fundraisers, and organic body care fundraisers.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
=== Reusable Product Fundraisers ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reusable product fundraisers are very earth friendly.  Reusable shopping bags are a popular choice because using a reusable shopping just 11 times makes it more envrionmentally friendly than the plastic equivalents&amp;lt;ref&amp;gt;&amp;quot;Wikipedia - plastic shopping bag&amp;quot;&amp;lt;/ref&amp;gt; {{cite web | title=Wikipedia - Plastic Shopping Bags | url=http://en.wikipedia.org/wiki/Plastic_shopping_bag | publisher=Wikipedia.org}}.&lt;/div&gt;</summary>
		<author><name>70.254.179.146</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36722</id>
		<title>Basic Java Language</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36722"/>
		<updated>2006-11-26T19:58:10Z</updated>

		<summary type="html">&lt;p&gt;70.254.189.104: /* Public, Private - What are they? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This lesson discusses the basics of the Java language, including variables, primitives, operators, statements and Java writing conventions.&lt;br /&gt;
==Variables==&lt;br /&gt;
Variables are used to store data that can change. There are two main categories of variables, &#039;&#039;reference variables&#039;&#039; and &#039;&#039;primitive variables&#039;&#039;. Reference variables are place holders for objects (More on objects in Lesson 4, [[Java Objects and Classes]].) Primitive variables are given a value of a primitive, a basic value. Variables are all given a type when they are declared, such as &amp;quot;int&amp;quot; or &amp;quot;string&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Primitive Data Types==&lt;br /&gt;
Primitives are the simplest type of data. Primitives consist of numbers, letters and strings of letters. The following table shows all the types of primitives.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Primitive&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| A brief, 8-bit integer&lt;br /&gt;
| Whole numbers -128 through 127&lt;br /&gt;
|-&lt;br /&gt;
| short&lt;br /&gt;
| A short, 16-bit integer&lt;br /&gt;
| Whole numbers -32,768 through 32,767&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| A 32 bit integer&lt;br /&gt;
| Whole numbers -2,147,483,648 through 2,147,483,647&lt;br /&gt;
|-&lt;br /&gt;
| long&lt;br /&gt;
| A long, 64 bit integer&lt;br /&gt;
| Whole numbers -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807&lt;br /&gt;
|-&lt;br /&gt;
| float&lt;br /&gt;
| Single-precision floating point (32-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 14e&amp;lt;sup&amp;gt;-45&amp;lt;/sup&amp;gt;, Largest positive non-zero: 3.4028234e&amp;lt;sup&amp;gt;38&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Double-precision floating point (64-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 4.9e&amp;lt;sup&amp;gt;-324&amp;lt;/sup&amp;gt;, Largest positive non-zero: 1.797693157e&amp;lt;sup&amp;gt;308&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| char&lt;br /&gt;
| A single character&lt;br /&gt;
| All Unicode characters&lt;br /&gt;
|-&lt;br /&gt;
| boolean&lt;br /&gt;
| A Boolean value&lt;br /&gt;
| &#039;&#039;&#039;true&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declaring Variables==&lt;br /&gt;
In a nutshell, declaring a variable has this syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt; [variable type] [identifier];&amp;lt;/pre&amp;gt;&lt;br /&gt;
This works for both reference variables and primitive variables. [variable type] is the type of variable, like &#039;&#039;&#039;int&#039;&#039;&#039; or &#039;&#039;&#039;char&#039;&#039;&#039;. [identifier] is the name for the variable you wish to create, for example, &#039;&#039;password&#039;&#039; or &#039;&#039;number_of_fish&#039;&#039;. If you wanted to create a &#039;&#039;&#039;int&#039;&#039;&#039; variable called &#039;&#039;age&#039;&#039;, you would type this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Notice the semicolon at the end of the statement. All statements in Java must end in this, otherwise you will get a compiler error. &lt;br /&gt;
&lt;br /&gt;
You can set the values of variables while declaring them, like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age = 100;&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can declare multiple variables on one line, if you wish:&lt;br /&gt;
&amp;lt;pre&amp;gt; boolean a, b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also, you can change variables after you already give them a value.&lt;br /&gt;
&amp;lt;pre&amp;gt;[v you want to change] = [v you want it to be];&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Identifiers===&lt;br /&gt;
There are several rules for the naming of your variables. Identifiers can be named using all the letters from A through Z (capital or lowercase, you choose), numbers 0-9 and underscore _ and the dollar sign $. The first character of the identifier cannot be a number, but it can be a letter, _ or $. &lt;br /&gt;
&lt;br /&gt;
You can&#039;t create two variables with the same identifier, all identifiers must be unique. You also can&#039;t use an identifier that is a Java keyword. Here is a list of all the [http://en.wikipedia.org/wiki/Java_keywords Java Keywords].  [[Flashcards for Java keywords]] provides some assistance in memorizing the concepts behind specific keywords.&lt;br /&gt;
&lt;br /&gt;
==Statements==&lt;br /&gt;
A statement in Java is a chunk of code that does something specific completely. Statements are ended by a semicolon ;. An example of a statement is the declaration of a variable like we saw before. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;private int static numberOfObjectsInstantiated;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above declares a single memory location per class which may be incremented each time an object of that class is instantiated by calling its constructor method.&lt;br /&gt;
&lt;br /&gt;
Another example you will recall from the &amp;quot;Hello World&amp;quot; program we made in Lesson 1. &lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;Hello World&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
This line of code prints &#039;&#039;Hello World&#039;&#039; onto the console.&lt;br /&gt;
&lt;br /&gt;
A third example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (ourShip.speed&amp;lt;10) then ourShip.mainThrustPulse(2);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above checks a ship object&#039;s speed and if it is less than ten then it commands the ship object to fire two pulses from its main propulsion rockets.  It is a single specific application task completed at the semi-colon when it moves to the next chunk of code.&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
Comments are notes that the developer can insert into their code. This allows the developer to keep track of their code and helps when developers are collaborating on a project. It is good to write a summary of the following code at the beginning of your methods, classes, etc. The Java compiler completely ignores comments, so you can say anything in them&lt;br /&gt;
&lt;br /&gt;
Comments are written using two forward slashes&lt;br /&gt;
&amp;lt;pre&amp;gt;//This is a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can be written at the end of a line&lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;I love comments&amp;quot;); //This is also a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can also be written on multiple lines by starting with &#039;&#039;&#039;/*&#039;&#039;&#039; and ending with&#039;&#039;&#039;*/&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Comment 1&lt;br /&gt;
Comment 2&lt;br /&gt;
Comment 3 */&amp;lt;/pre&amp;gt;&lt;br /&gt;
:Sun recommends the above form be reserved for information intended for automatic JavaDoc documentation.&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
===Assignment Operator = ===&lt;br /&gt;
The assignment operator sets the variable on its left equal to the value on its right. This code creates the variable &#039;&#039;a&#039;&#039; and sets it equal to 5&lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
a = 5;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Fairly simple, right? Here is where it can get a little more tricky. &lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
int b;&lt;br /&gt;
b = 6;&lt;br /&gt;
a = b; //a equals 6&amp;lt;/pre&amp;gt;&lt;br /&gt;
At first glance, you might think that the last statement is setting &#039;&#039;a&#039;&#039; equal to the letter &amp;quot;b&amp;quot;, but instead it is setting &#039;&#039;a&#039;&#039; equal to the &#039;&#039;value&#039;&#039; of &#039;&#039;b&#039;&#039;, which is 6.&lt;br /&gt;
&lt;br /&gt;
===Addition Operator +===&lt;br /&gt;
Unlike the = operator, a statement that simply uses the addition operator and two other values on either side does not do anything significant. For example, neither of the following three lines of code do anything.&lt;br /&gt;
&amp;lt;pre&amp;gt;5 + 6;&lt;br /&gt;
a + 9;&lt;br /&gt;
a + b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to you want to use the addition operator to add 6 to the value of &#039;&#039;a&#039;&#039;, it would be used like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;a = a + 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or you can use a shortcut in order to reach the same result as the above.&lt;br /&gt;
&amp;lt;pre&amp;gt;a += 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are shortcuts to all of the operators, which will be shown in the following sections.&lt;br /&gt;
&lt;br /&gt;
===Subtraction -, Division / and Multiplication * Operators===&lt;br /&gt;
&lt;br /&gt;
Just like the addition operator, the Subtraction, Division, and Multiplication operators are used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a;&lt;br /&gt;
&lt;br /&gt;
a = a-1;&lt;br /&gt;
a = a/1;&lt;br /&gt;
a = a*1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of &amp;quot;a&amp;quot; in each example would be simply&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1st a - &amp;quot;a&amp;quot; minus 1&lt;br /&gt;
2nd a - &amp;quot;a&amp;quot; divided by 1&lt;br /&gt;
3rd a - &amp;quot;a&amp;quot; multiplied by 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the operators are used at once, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a, b, c, d;&lt;br /&gt;
&lt;br /&gt;
a = a-b/c*d;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You would then use the order or operations, otherwise known as [http://en.wikipedia.org/wiki/PEMDAS PEMDAS], to find the result of &amp;quot;a&amp;quot;; which would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a = a - (b/c)d&lt;br /&gt;
or&lt;br /&gt;
         b&lt;br /&gt;
a = a - ---&lt;br /&gt;
       (c*d)&lt;br /&gt;
&lt;br /&gt;
(either way the result is the same)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or if you prefer actual numbers, it would look like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a = 1;&lt;br /&gt;
int b = 2;&lt;br /&gt;
int c = 2;&lt;br /&gt;
int d = 1;&lt;br /&gt;
&lt;br /&gt;
a = 1-2/2*1;&lt;br /&gt;
&lt;br /&gt;
thus:&lt;br /&gt;
&lt;br /&gt;
a = 1 - 1&lt;br /&gt;
or &lt;br /&gt;
a = 0;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Public, Private - What are they?==&lt;br /&gt;
These statments are used to protect data. For example, &amp;quot;private int myInt&amp;quot; will make myInt only accessible from the class it is in. Here is a complete description:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Desc.&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example + Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| private&lt;br /&gt;
| Variable only accessible from class it is in&lt;br /&gt;
| private int myInt;//myInt can only be edited and viewed from the class it is in&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| (No modifier) - only accessible from class and subclass&lt;br /&gt;
| int myInt;//A subclass can access it, as the class it is in&lt;br /&gt;
|-&lt;br /&gt;
| protected&lt;br /&gt;
| Accessible from package, subclass, and class&lt;br /&gt;
| protected int myInt;//Class, subclass, and package classes can access it&lt;br /&gt;
|-&lt;br /&gt;
| public&lt;br /&gt;
| Fully accessible&lt;br /&gt;
| public int myInt;//Any class can access it&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More coming soon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Topic:Java|Back to Java Main Page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]]&lt;/div&gt;</summary>
		<author><name>70.254.189.104</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36721</id>
		<title>Basic Java Language</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36721"/>
		<updated>2006-11-26T19:57:42Z</updated>

		<summary type="html">&lt;p&gt;70.254.189.104: /* Public, Private - What are they? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This lesson discusses the basics of the Java language, including variables, primitives, operators, statements and Java writing conventions.&lt;br /&gt;
==Variables==&lt;br /&gt;
Variables are used to store data that can change. There are two main categories of variables, &#039;&#039;reference variables&#039;&#039; and &#039;&#039;primitive variables&#039;&#039;. Reference variables are place holders for objects (More on objects in Lesson 4, [[Java Objects and Classes]].) Primitive variables are given a value of a primitive, a basic value. Variables are all given a type when they are declared, such as &amp;quot;int&amp;quot; or &amp;quot;string&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Primitive Data Types==&lt;br /&gt;
Primitives are the simplest type of data. Primitives consist of numbers, letters and strings of letters. The following table shows all the types of primitives.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Primitive&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| A brief, 8-bit integer&lt;br /&gt;
| Whole numbers -128 through 127&lt;br /&gt;
|-&lt;br /&gt;
| short&lt;br /&gt;
| A short, 16-bit integer&lt;br /&gt;
| Whole numbers -32,768 through 32,767&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| A 32 bit integer&lt;br /&gt;
| Whole numbers -2,147,483,648 through 2,147,483,647&lt;br /&gt;
|-&lt;br /&gt;
| long&lt;br /&gt;
| A long, 64 bit integer&lt;br /&gt;
| Whole numbers -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807&lt;br /&gt;
|-&lt;br /&gt;
| float&lt;br /&gt;
| Single-precision floating point (32-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 14e&amp;lt;sup&amp;gt;-45&amp;lt;/sup&amp;gt;, Largest positive non-zero: 3.4028234e&amp;lt;sup&amp;gt;38&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Double-precision floating point (64-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 4.9e&amp;lt;sup&amp;gt;-324&amp;lt;/sup&amp;gt;, Largest positive non-zero: 1.797693157e&amp;lt;sup&amp;gt;308&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| char&lt;br /&gt;
| A single character&lt;br /&gt;
| All Unicode characters&lt;br /&gt;
|-&lt;br /&gt;
| boolean&lt;br /&gt;
| A Boolean value&lt;br /&gt;
| &#039;&#039;&#039;true&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declaring Variables==&lt;br /&gt;
In a nutshell, declaring a variable has this syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt; [variable type] [identifier];&amp;lt;/pre&amp;gt;&lt;br /&gt;
This works for both reference variables and primitive variables. [variable type] is the type of variable, like &#039;&#039;&#039;int&#039;&#039;&#039; or &#039;&#039;&#039;char&#039;&#039;&#039;. [identifier] is the name for the variable you wish to create, for example, &#039;&#039;password&#039;&#039; or &#039;&#039;number_of_fish&#039;&#039;. If you wanted to create a &#039;&#039;&#039;int&#039;&#039;&#039; variable called &#039;&#039;age&#039;&#039;, you would type this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Notice the semicolon at the end of the statement. All statements in Java must end in this, otherwise you will get a compiler error. &lt;br /&gt;
&lt;br /&gt;
You can set the values of variables while declaring them, like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age = 100;&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can declare multiple variables on one line, if you wish:&lt;br /&gt;
&amp;lt;pre&amp;gt; boolean a, b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also, you can change variables after you already give them a value.&lt;br /&gt;
&amp;lt;pre&amp;gt;[v you want to change] = [v you want it to be];&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Identifiers===&lt;br /&gt;
There are several rules for the naming of your variables. Identifiers can be named using all the letters from A through Z (capital or lowercase, you choose), numbers 0-9 and underscore _ and the dollar sign $. The first character of the identifier cannot be a number, but it can be a letter, _ or $. &lt;br /&gt;
&lt;br /&gt;
You can&#039;t create two variables with the same identifier, all identifiers must be unique. You also can&#039;t use an identifier that is a Java keyword. Here is a list of all the [http://en.wikipedia.org/wiki/Java_keywords Java Keywords].  [[Flashcards for Java keywords]] provides some assistance in memorizing the concepts behind specific keywords.&lt;br /&gt;
&lt;br /&gt;
==Statements==&lt;br /&gt;
A statement in Java is a chunk of code that does something specific completely. Statements are ended by a semicolon ;. An example of a statement is the declaration of a variable like we saw before. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;private int static numberOfObjectsInstantiated;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above declares a single memory location per class which may be incremented each time an object of that class is instantiated by calling its constructor method.&lt;br /&gt;
&lt;br /&gt;
Another example you will recall from the &amp;quot;Hello World&amp;quot; program we made in Lesson 1. &lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;Hello World&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
This line of code prints &#039;&#039;Hello World&#039;&#039; onto the console.&lt;br /&gt;
&lt;br /&gt;
A third example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (ourShip.speed&amp;lt;10) then ourShip.mainThrustPulse(2);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above checks a ship object&#039;s speed and if it is less than ten then it commands the ship object to fire two pulses from its main propulsion rockets.  It is a single specific application task completed at the semi-colon when it moves to the next chunk of code.&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
Comments are notes that the developer can insert into their code. This allows the developer to keep track of their code and helps when developers are collaborating on a project. It is good to write a summary of the following code at the beginning of your methods, classes, etc. The Java compiler completely ignores comments, so you can say anything in them&lt;br /&gt;
&lt;br /&gt;
Comments are written using two forward slashes&lt;br /&gt;
&amp;lt;pre&amp;gt;//This is a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can be written at the end of a line&lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;I love comments&amp;quot;); //This is also a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can also be written on multiple lines by starting with &#039;&#039;&#039;/*&#039;&#039;&#039; and ending with&#039;&#039;&#039;*/&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Comment 1&lt;br /&gt;
Comment 2&lt;br /&gt;
Comment 3 */&amp;lt;/pre&amp;gt;&lt;br /&gt;
:Sun recommends the above form be reserved for information intended for automatic JavaDoc documentation.&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
===Assignment Operator = ===&lt;br /&gt;
The assignment operator sets the variable on its left equal to the value on its right. This code creates the variable &#039;&#039;a&#039;&#039; and sets it equal to 5&lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
a = 5;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Fairly simple, right? Here is where it can get a little more tricky. &lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
int b;&lt;br /&gt;
b = 6;&lt;br /&gt;
a = b; //a equals 6&amp;lt;/pre&amp;gt;&lt;br /&gt;
At first glance, you might think that the last statement is setting &#039;&#039;a&#039;&#039; equal to the letter &amp;quot;b&amp;quot;, but instead it is setting &#039;&#039;a&#039;&#039; equal to the &#039;&#039;value&#039;&#039; of &#039;&#039;b&#039;&#039;, which is 6.&lt;br /&gt;
&lt;br /&gt;
===Addition Operator +===&lt;br /&gt;
Unlike the = operator, a statement that simply uses the addition operator and two other values on either side does not do anything significant. For example, neither of the following three lines of code do anything.&lt;br /&gt;
&amp;lt;pre&amp;gt;5 + 6;&lt;br /&gt;
a + 9;&lt;br /&gt;
a + b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to you want to use the addition operator to add 6 to the value of &#039;&#039;a&#039;&#039;, it would be used like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;a = a + 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or you can use a shortcut in order to reach the same result as the above.&lt;br /&gt;
&amp;lt;pre&amp;gt;a += 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are shortcuts to all of the operators, which will be shown in the following sections.&lt;br /&gt;
&lt;br /&gt;
===Subtraction -, Division / and Multiplication * Operators===&lt;br /&gt;
&lt;br /&gt;
Just like the addition operator, the Subtraction, Division, and Multiplication operators are used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a;&lt;br /&gt;
&lt;br /&gt;
a = a-1;&lt;br /&gt;
a = a/1;&lt;br /&gt;
a = a*1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of &amp;quot;a&amp;quot; in each example would be simply&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1st a - &amp;quot;a&amp;quot; minus 1&lt;br /&gt;
2nd a - &amp;quot;a&amp;quot; divided by 1&lt;br /&gt;
3rd a - &amp;quot;a&amp;quot; multiplied by 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the operators are used at once, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a, b, c, d;&lt;br /&gt;
&lt;br /&gt;
a = a-b/c*d;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You would then use the order or operations, otherwise known as [http://en.wikipedia.org/wiki/PEMDAS PEMDAS], to find the result of &amp;quot;a&amp;quot;; which would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a = a - (b/c)d&lt;br /&gt;
or&lt;br /&gt;
         b&lt;br /&gt;
a = a - ---&lt;br /&gt;
       (c*d)&lt;br /&gt;
&lt;br /&gt;
(either way the result is the same)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or if you prefer actual numbers, it would look like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a = 1;&lt;br /&gt;
int b = 2;&lt;br /&gt;
int c = 2;&lt;br /&gt;
int d = 1;&lt;br /&gt;
&lt;br /&gt;
a = 1-2/2*1;&lt;br /&gt;
&lt;br /&gt;
thus:&lt;br /&gt;
&lt;br /&gt;
a = 1 - 1&lt;br /&gt;
or &lt;br /&gt;
a = 0;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Public, Private - What are they?==&lt;br /&gt;
These statments are used to protect data. For example, &amp;quot;private int myInt&amp;quot; will make myInt only accessible from the class it is in. Here is a complete description:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Desc.&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example + Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| private&lt;br /&gt;
| Variable only accessible from class it is in&lt;br /&gt;
| private int myInt;//myInt can only be edited and viewed from the class it is in&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| (No modifier) - only accessible from class and subclass&lt;br /&gt;
| private int myInt;//A subclass can access it, as the class it is in&lt;br /&gt;
|-&lt;br /&gt;
| protected&lt;br /&gt;
| Accessible from package, subclass, and class&lt;br /&gt;
| private int myInt;//Class, subclass, and package classes can access it&lt;br /&gt;
|-&lt;br /&gt;
| public&lt;br /&gt;
| Fully accessible&lt;br /&gt;
| private int myInt;//Any class can access it&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More coming soon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Topic:Java|Back to Java Main Page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]]&lt;/div&gt;</summary>
		<author><name>70.254.189.104</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36720</id>
		<title>Basic Java Language</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36720"/>
		<updated>2006-11-26T19:51:53Z</updated>

		<summary type="html">&lt;p&gt;70.254.189.104: /* Subtraction -, Division / and Multiplication * Operators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This lesson discusses the basics of the Java language, including variables, primitives, operators, statements and Java writing conventions.&lt;br /&gt;
==Variables==&lt;br /&gt;
Variables are used to store data that can change. There are two main categories of variables, &#039;&#039;reference variables&#039;&#039; and &#039;&#039;primitive variables&#039;&#039;. Reference variables are place holders for objects (More on objects in Lesson 4, [[Java Objects and Classes]].) Primitive variables are given a value of a primitive, a basic value. Variables are all given a type when they are declared, such as &amp;quot;int&amp;quot; or &amp;quot;string&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Primitive Data Types==&lt;br /&gt;
Primitives are the simplest type of data. Primitives consist of numbers, letters and strings of letters. The following table shows all the types of primitives.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Primitive&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| A brief, 8-bit integer&lt;br /&gt;
| Whole numbers -128 through 127&lt;br /&gt;
|-&lt;br /&gt;
| short&lt;br /&gt;
| A short, 16-bit integer&lt;br /&gt;
| Whole numbers -32,768 through 32,767&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| A 32 bit integer&lt;br /&gt;
| Whole numbers -2,147,483,648 through 2,147,483,647&lt;br /&gt;
|-&lt;br /&gt;
| long&lt;br /&gt;
| A long, 64 bit integer&lt;br /&gt;
| Whole numbers -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807&lt;br /&gt;
|-&lt;br /&gt;
| float&lt;br /&gt;
| Single-precision floating point (32-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 14e&amp;lt;sup&amp;gt;-45&amp;lt;/sup&amp;gt;, Largest positive non-zero: 3.4028234e&amp;lt;sup&amp;gt;38&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Double-precision floating point (64-bit IEEE 754)&lt;br /&gt;
| Smallest positive non-zero: 4.9e&amp;lt;sup&amp;gt;-324&amp;lt;/sup&amp;gt;, Largest positive non-zero: 1.797693157e&amp;lt;sup&amp;gt;308&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| char&lt;br /&gt;
| A single character&lt;br /&gt;
| All Unicode characters&lt;br /&gt;
|-&lt;br /&gt;
| boolean&lt;br /&gt;
| A Boolean value&lt;br /&gt;
| &#039;&#039;&#039;true&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declaring Variables==&lt;br /&gt;
In a nutshell, declaring a variable has this syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt; [variable type] [identifier];&amp;lt;/pre&amp;gt;&lt;br /&gt;
This works for both reference variables and primitive variables. [variable type] is the type of variable, like &#039;&#039;&#039;int&#039;&#039;&#039; or &#039;&#039;&#039;char&#039;&#039;&#039;. [identifier] is the name for the variable you wish to create, for example, &#039;&#039;password&#039;&#039; or &#039;&#039;number_of_fish&#039;&#039;. If you wanted to create a &#039;&#039;&#039;int&#039;&#039;&#039; variable called &#039;&#039;age&#039;&#039;, you would type this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Notice the semicolon at the end of the statement. All statements in Java must end in this, otherwise you will get a compiler error. &lt;br /&gt;
&lt;br /&gt;
You can set the values of variables while declaring them, like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;int age = 100;&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can declare multiple variables on one line, if you wish:&lt;br /&gt;
&amp;lt;pre&amp;gt; boolean a, b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also, you can change variables after you already give them a value.&lt;br /&gt;
&amp;lt;pre&amp;gt;[v you want to change] = [v you want it to be];&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Identifiers===&lt;br /&gt;
There are several rules for the naming of your variables. Identifiers can be named using all the letters from A through Z (capital or lowercase, you choose), numbers 0-9 and underscore _ and the dollar sign $. The first character of the identifier cannot be a number, but it can be a letter, _ or $. &lt;br /&gt;
&lt;br /&gt;
You can&#039;t create two variables with the same identifier, all identifiers must be unique. You also can&#039;t use an identifier that is a Java keyword. Here is a list of all the [http://en.wikipedia.org/wiki/Java_keywords Java Keywords].  [[Flashcards for Java keywords]] provides some assistance in memorizing the concepts behind specific keywords.&lt;br /&gt;
&lt;br /&gt;
==Statements==&lt;br /&gt;
A statement in Java is a chunk of code that does something specific completely. Statements are ended by a semicolon ;. An example of a statement is the declaration of a variable like we saw before. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;private int static numberOfObjectsInstantiated;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above declares a single memory location per class which may be incremented each time an object of that class is instantiated by calling its constructor method.&lt;br /&gt;
&lt;br /&gt;
Another example you will recall from the &amp;quot;Hello World&amp;quot; program we made in Lesson 1. &lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;Hello World&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
This line of code prints &#039;&#039;Hello World&#039;&#039; onto the console.&lt;br /&gt;
&lt;br /&gt;
A third example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if (ourShip.speed&amp;lt;10) then ourShip.mainThrustPulse(2);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above checks a ship object&#039;s speed and if it is less than ten then it commands the ship object to fire two pulses from its main propulsion rockets.  It is a single specific application task completed at the semi-colon when it moves to the next chunk of code.&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
Comments are notes that the developer can insert into their code. This allows the developer to keep track of their code and helps when developers are collaborating on a project. It is good to write a summary of the following code at the beginning of your methods, classes, etc. The Java compiler completely ignores comments, so you can say anything in them&lt;br /&gt;
&lt;br /&gt;
Comments are written using two forward slashes&lt;br /&gt;
&amp;lt;pre&amp;gt;//This is a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can be written at the end of a line&lt;br /&gt;
&amp;lt;pre&amp;gt;System.out.println(&amp;quot;I love comments&amp;quot;); //This is also a comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comments can also be written on multiple lines by starting with &#039;&#039;&#039;/*&#039;&#039;&#039; and ending with&#039;&#039;&#039;*/&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Comment 1&lt;br /&gt;
Comment 2&lt;br /&gt;
Comment 3 */&amp;lt;/pre&amp;gt;&lt;br /&gt;
:Sun recommends the above form be reserved for information intended for automatic JavaDoc documentation.&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
===Assignment Operator = ===&lt;br /&gt;
The assignment operator sets the variable on its left equal to the value on its right. This code creates the variable &#039;&#039;a&#039;&#039; and sets it equal to 5&lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
a = 5;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Fairly simple, right? Here is where it can get a little more tricky. &lt;br /&gt;
&amp;lt;pre&amp;gt;int a;&lt;br /&gt;
int b;&lt;br /&gt;
b = 6;&lt;br /&gt;
a = b; //a equals 6&amp;lt;/pre&amp;gt;&lt;br /&gt;
At first glance, you might think that the last statement is setting &#039;&#039;a&#039;&#039; equal to the letter &amp;quot;b&amp;quot;, but instead it is setting &#039;&#039;a&#039;&#039; equal to the &#039;&#039;value&#039;&#039; of &#039;&#039;b&#039;&#039;, which is 6.&lt;br /&gt;
&lt;br /&gt;
===Addition Operator +===&lt;br /&gt;
Unlike the = operator, a statement that simply uses the addition operator and two other values on either side does not do anything significant. For example, neither of the following three lines of code do anything.&lt;br /&gt;
&amp;lt;pre&amp;gt;5 + 6;&lt;br /&gt;
a + 9;&lt;br /&gt;
a + b;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to you want to use the addition operator to add 6 to the value of &#039;&#039;a&#039;&#039;, it would be used like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;a = a + 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or you can use a shortcut in order to reach the same result as the above.&lt;br /&gt;
&amp;lt;pre&amp;gt;a += 6;&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are shortcuts to all of the operators, which will be shown in the following sections.&lt;br /&gt;
&lt;br /&gt;
===Subtraction -, Division / and Multiplication * Operators===&lt;br /&gt;
&lt;br /&gt;
Just like the addition operator, the Subtraction, Division, and Multiplication operators are used as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a;&lt;br /&gt;
&lt;br /&gt;
a = a-1;&lt;br /&gt;
a = a/1;&lt;br /&gt;
a = a*1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of &amp;quot;a&amp;quot; in each example would be simply&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1st a - &amp;quot;a&amp;quot; minus 1&lt;br /&gt;
2nd a - &amp;quot;a&amp;quot; divided by 1&lt;br /&gt;
3rd a - &amp;quot;a&amp;quot; multiplied by 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the operators are used at once, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a, b, c, d;&lt;br /&gt;
&lt;br /&gt;
a = a-b/c*d;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You would then use the order or operations, otherwise known as [http://en.wikipedia.org/wiki/PEMDAS PEMDAS], to find the result of &amp;quot;a&amp;quot;; which would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a = a - (b/c)d&lt;br /&gt;
or&lt;br /&gt;
         b&lt;br /&gt;
a = a - ---&lt;br /&gt;
       (c*d)&lt;br /&gt;
&lt;br /&gt;
(either way the result is the same)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or if you prefer actual numbers, it would look like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a = 1;&lt;br /&gt;
int b = 2;&lt;br /&gt;
int c = 2;&lt;br /&gt;
int d = 1;&lt;br /&gt;
&lt;br /&gt;
a = 1-2/2*1;&lt;br /&gt;
&lt;br /&gt;
thus:&lt;br /&gt;
&lt;br /&gt;
a = 1 - 1&lt;br /&gt;
or &lt;br /&gt;
a = 0;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Public, Private - What are they?==&lt;br /&gt;
These statments are used to protect data. For example, &amp;quot;private int myInt&amp;quot; will make myInt only accessible from the class it is in. Here is a complete description:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;*Coming in a moment*&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More coming soon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Topic:Java|Back to Java Main Page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]]&lt;/div&gt;</summary>
		<author><name>70.254.189.104</name></author>
	</entry>
</feed>