<?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=194.81.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=194.81.0.0%2F16"/>
	<link rel="alternate" type="text/html" href="https://ideawaza.com/wiki/Special:Contributions/194.81.0.0/16"/>
	<updated>2026-09-30T06:21:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36786</id>
		<title>Basic Java Language</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36786"/>
		<updated>2007-03-13T10:36:29Z</updated>

		<summary type="html">&lt;p&gt;194.81.160.1: /* 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;
&lt;br /&gt;
=Touch on Classes=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Everything in Java is specified inside classes. Classes are bodies of statements, methods, and variables. A statement can be thought of as the smallest standalone element of an imperative programming language (or a language that explicitly specify an algorithm to achieve a goal, opposed to declarative programming, which explicitly specifies a goal and leaves the implementation of that goal to algorithms within the support software). A program is formed by a sequence of one or more statements (e.g. if x, then y). A statement will have internal components (e.g. expressions). A method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called return value) of some kind. There is a method called main that all classes have. This is the start point of your program - where everything must begin. To create a class, the syntax (or basic outline in code) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Protection] class [Name] [Extend/Implements...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Right now, let&#039;s examine the first 3. &amp;quot;[Protection]&amp;quot; refers to permissions of who can access the class, and will be discussed later. The label &amp;quot;class&amp;quot; is required to create a class. &amp;quot;Name&amp;quot; can be any valid identifier (see Valid Identifiers...). The name will be used to create objects (more later...). Here is what you type to create a class, as for now, and all you must worry about:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class NAME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
NAME, again,is the identifier.  (Java is case sensitive; so NAME is different from Name.  Industry convention suggest naming classes using mixed case, starting with an uppercase letter.[http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html]  For example:  NameNumberTwo)&lt;br /&gt;
&lt;br /&gt;
Classes also have a body - where you actually put the things. To create the body you have a { and }. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class NAME&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This, essentially creates a class. All the code goes between the {, called the opening brace, and the }, called the closing brace.&lt;br /&gt;
&lt;br /&gt;
=Protection=&lt;br /&gt;
{{Template:confusing|December 2006}}&lt;br /&gt;
Java allows you to abstract the internal data of a class from other code that uses that class. The idea here is to create a &amp;quot;black box&amp;quot; effect, where classes that use your class have no knowledge of the internal workings of the class. This simplifies changing the class if done consistently, as other classes don&#039;t depend on anything within the class.&lt;br /&gt;
&lt;br /&gt;
There are three &#039;&#039;&#039;access modifiers&#039;&#039;&#039; and four &#039;&#039;&#039;access levels&#039;&#039;&#039; (one level is the default, used when no modifier appears). If your class attempts to access another class, it will only be able to if it is allowed access. If you don&#039;t have access to the code you&#039;re trying to access, the compiler will notice and you&#039;ll get a compile-time error. The four levels and three modifiers are as follows:&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;Modifier&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Level&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Accessible From&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;&lt;br /&gt;
| Private&lt;br /&gt;
| An object of the exact same class as the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Default&amp;lt;/code&amp;gt;&lt;br /&gt;
| Default; sometimes called &#039;&#039;package-private&#039;&#039;&lt;br /&gt;
| An object of the same package as the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt;&lt;br /&gt;
| Protected&lt;br /&gt;
| An object of the same or subclass of the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt;&lt;br /&gt;
| Public&lt;br /&gt;
| Anywhere&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;declaring class&#039;&#039; is the class containing the field, method, or nested class being modified. (For example, if the class &amp;lt;code&amp;gt;Foo&amp;lt;/code&amp;gt; contains a method &amp;lt;code&amp;gt;bar()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Foo&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;bar()&amp;lt;/code&amp;gt;&#039;s declaring class.)&lt;br /&gt;
&lt;br /&gt;
The protected and default levels deal with [[Java/Inheritance|inheritance]] and [[Java Deployment|packages]] respectively; these concepts are dealt with in later lessons. For now, declare all classes public (private classes are only useful — or even possible — when nested, and nested classes definitely comes later). Methods should be public if they&#039;re meant to be called by other classes. Declare a method private if it should only be called by its own class.&lt;br /&gt;
&lt;br /&gt;
=Statements=&lt;br /&gt;
All operations are done in statements. Every statement ends in a semicolon: ;. Statements can set a variable with the &#039;=&#039; operator. This sets the variable you wish to set to another variable or a value. Values can only be used on primitive types.  As you saw in the HelloWorld program, there was one statement: &amp;lt;code&amp;gt;System.out.println(&amp;quot;Hello, World&amp;quot;)&amp;lt;/code&amp;gt;. This is one type of statement called &amp;quot;calling a method&amp;quot;. More will be discussed later. Finally, you can declare a variable. If a class has no statements, it would do nothing.&lt;br /&gt;
&lt;br /&gt;
=Variables=&lt;br /&gt;
Variables are used to store information in a computer&#039;s memory. Like its name implies, variables are values that can be changed. There are two main categories of variables: reference variables and primitive variables. 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;
==Declaring Variables==&lt;br /&gt;
To declare a variable, use this syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[protection] [classname] [identifier]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is one type of statement. The class name is the type of variable you want. Currently, you will only use basic primitive variables, but you will learn about objects soon. Here is an example of declaring a variable:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public int myInt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
myInt has protection of public. It is of class int, or Integer (see Primitive Types). int is a class in Java. When you say that, you are basically making a primitive object.&lt;br /&gt;
&lt;br /&gt;
==Primitive Data Types==&lt;br /&gt;
Primitives are the simplest type of data. 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;
&lt;br /&gt;
Using what you have learned, You may have guessed how to create a long or double.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;long myLong;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;double myDouble;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
&lt;br /&gt;
===Assignment Operator &#039;=&#039;===&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. Essentially, a &#039;&#039;&#039;is&#039;&#039;&#039; now 6. You can also set a variable and declare it on the same line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a = 6;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, you can&#039;t say &amp;lt;code&amp;gt;char myChar = y;&amp;lt;/code&amp;gt; to set a character to &#039;y&#039;. That would set the character variable &amp;lt;code&amp;gt;myChar&amp;lt;/code&amp;gt; to the value stored in the character variable &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;. To set &amp;lt;code&amp;gt;myChar&amp;lt;/code&amp;gt; equal to the character &amp;lt;i&amp;gt;y&amp;lt;/i&amp;gt;, use a &#039;&#039;&#039;character literal&#039;&#039;&#039; — a technical term for &amp;quot;a character in single-quotes&amp;quot;: &amp;lt;code&amp;gt;char myChar = &#039;y&#039;;&amp;lt;/code&amp;gt;. Note that a &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt; primitive can only hold a single character. &amp;lt;code&amp;gt;char myChar = &#039;Yo&#039;;&amp;lt;/code&amp;gt; is illegal.&lt;br /&gt;
&lt;br /&gt;
Finally, what&#039;s so special about &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;s and &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;s? Doubles and floats can have decimals: &amp;lt;code&amp;gt;float myFloat = 5.1;&amp;lt;/code&amp;gt;. (The term &amp;quot;float&amp;quot; is short for &amp;quot;floating-point number,&amp;quot; referring to the decimal point.)&lt;br /&gt;
&lt;br /&gt;
Now, why would you want to set a variable? For further use, ie, to access at a later time. For example, you can do calculations with other operators...&lt;br /&gt;
&lt;br /&gt;
===Addition Operator +===&lt;br /&gt;
The addition operator is different from the = operator. It does not set anything. You would need the = operator to do any setting.&lt;br /&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;
The Java Programming Language would use the order of operations in this example.&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut for subtracting a value from int myInt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
myInt -= 4;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Valid 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 $. Identifiers can be no longer than 32 characters.&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, listed below. [[Flashcards for Java keywords]] provides some assistance in memorizing the concepts behind specific keywords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 | &amp;lt;code&amp;gt;abstract&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;assert&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;break&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;byte&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;catch&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;const&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;continue&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;extends&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;final&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;finally&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;goto&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;implements&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;import&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;instanceof&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;interface&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;long&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;native&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;return&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;short&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;strictfp&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;super&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;switch&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;synchronized&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;throw&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;throws&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;transient&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;try&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;void&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;volatile&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &lt;br /&gt;
 | &lt;br /&gt;
 | &lt;br /&gt;
 |}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Identifiers should also be meaningful, while maintaining practicality. If calculating the sum of a set of numbers, &amp;lt;code&amp;gt;sum&amp;lt;code&amp;gt; is better than &amp;lt;code&amp;gt;cumulativeTotal&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt; might be too short.&lt;br /&gt;
&lt;br /&gt;
=Using the Displayer with Variables=&lt;br /&gt;
This section is about printing to the console using &amp;lt;code&amp;gt;System.out.println();&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For Strings, it is extremely simple:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(STRING IDENTIFIER HERE);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But for other variables, you have to do it like this:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(VARIABLE IDENT + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because that method&#039;s parameter requires a string, and to change a variable to a string you say +&amp;quot;&amp;quot;. Note that this only works on primitive types. On objects you have to have a method toString(), which we will learn about later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(54 + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do multiple variables on the same line:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(false + 54 + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can put it anywhere: &amp;lt;code&amp;gt;System.out.println(false + &amp;quot;&amp;quot; + 54)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this won&#039;t work for two literal numeric values:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(54 + 32)&amp;lt;/code&amp;gt;. It would mistake it for the adding operator for values. For strings, the operator is different. So you would have to do: &amp;lt;code&amp;gt;System.out.println(54+&amp;quot;&amp;quot;+32)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can do calculations and print the result! For example, say you want to print 6*6*6*6. Here is the code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class Multiplying&lt;br /&gt;
{&lt;br /&gt;
  public static void main(String args[])&lt;br /&gt;
  {&lt;br /&gt;
    int a = 6;&lt;br /&gt;
    int b = a*a*a*a;&lt;br /&gt;
    System.out.println(b + &amp;quot;&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
A multiline comment that opens with two asterisks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Like this */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is called a &#039;&#039;&#039;javadoc comment&#039;&#039;&#039;. As a general rule, don&#039;t use these unless you mean to run the javadoc program on your code.&lt;br /&gt;
&lt;br /&gt;
=Compiling and Running your program=&lt;br /&gt;
To compile your program, go to the directory you saved it. Note that if your class was named NaMe then your file &#039;&#039;&#039;must&#039;&#039;&#039; be named NaMe.java. Anyways, type: &amp;lt;code&amp;gt;javac NaMe.java&amp;lt;/code&amp;gt; where NaMe is your class name. To run, type &amp;lt;code&amp;gt;java NaMe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that if the compiler reports syntax errors with your code, you must look in your source code and fix them. These are usually typos, but can be missing colons (;) or other formatting issues.&lt;br /&gt;
&lt;br /&gt;
If, when running, it reports invalid class file, the compiler might not have created a file. It should have given an error message at compile time.&lt;br /&gt;
&lt;br /&gt;
=Asking the User=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In order for the following to work properly, you must place the following code on the first line of your .java file. Importing packages will be explained later.&#039;&#039;&lt;br /&gt;
  import javax.swing.JOptionPane;&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s go on to asking the user to enter a number and doing calculations on it. Basically: &amp;lt;code&amp;gt;JOptionPane.showInputDialog(null, &amp;quot;Hello. Enter something&amp;quot;)&amp;lt;/code&amp;gt;. Try putting that in a class (in the main method, of course) and run it. Currently, we can&#039;t do anything with it because the value is deleted.&lt;br /&gt;
&lt;br /&gt;
Because what you enter can consist of letters OR numbers, and any length of them, what is &amp;quot;produced&amp;quot; by that is a String. The following will work: &amp;lt;code&amp;gt;String mine = JOptionPane.showInputDialog(null, &amp;quot;Now I can set a String!&amp;quot;);&amp;lt;/code&amp;gt;. Now lets say that after you get the string you want to print it. Just like regularly, add the following line: &amp;lt;code&amp;gt;System.out.println(mine);&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now you probably want to be able to enter a number. Java provides a method of changing a String to an int. It is Integer.parseInt(String_Here);. So lets say you want the user to enter a number and you print it. Do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int mine = Integer.parseInt(JOptionPane.showInputDialog(null, &amp;quot;Now I can set an INTEGER!&amp;quot;));&lt;br /&gt;
System.out.println(mine);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And now, of course, you can do whatever you want with that...&lt;br /&gt;
&lt;br /&gt;
=Exercises=&lt;br /&gt;
A. Create a program that stores a String with the value &amp;quot;ABC&amp;quot;. Then print the value using System.out.println(StringIdentifierHere). Don&#039;t use System.out.prinln(&amp;quot;ABC&amp;quot;), as we are focusing on creating variables.&lt;br /&gt;
&lt;br /&gt;
B. Do the above with a long set to 10000. Note that you have to say System.out.println(LongIdentifier + &amp;quot;&amp;quot;).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;!--[[Topic:Java|Back to Java Main Page]] | [[Introduction_to_Java|Previous Lesson]] | [[Java_Decision_Structures|Next Lesson]]--&amp;gt;&lt;br /&gt;
{{1lvlnav|[[Topic:Java|Java]]|[[Introduction to Java]]|[[Java Decision Structures]]}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Learning activities]]&lt;/div&gt;</summary>
		<author><name>194.81.160.1</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36785</id>
		<title>Basic Java Language</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Basic_Java_Language&amp;diff=36785"/>
		<updated>2007-03-13T10:28:50Z</updated>

		<summary type="html">&lt;p&gt;194.81.160.1: /* Protection */&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;
&lt;br /&gt;
=Touch on Classes=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Everything in Java is specified inside classes. Classes are bodies of statements, methods, and variables. A statement can be thought of as the smallest standalone element of an imperative programming language (or a language that explicitly specify an algorithm to achieve a goal, opposed to declarative programming, which explicitly specifies a goal and leaves the implementation of that goal to algorithms within the support software). A program is formed by a sequence of one or more statements (e.g. if x, then y). A statement will have internal components (e.g. expressions). A method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called return value) of some kind. There is a method called main that all classes have. This is the start point of your program - where everything must begin. To create a class, the syntax (or basic outline in code) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Protection] class [Name] [Extend/Implements...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Right now, let&#039;s examine the first 3. &amp;quot;[Protection]&amp;quot; refers to permissions of who can access the class, and will be discussed later. The label &amp;quot;class&amp;quot; is required to create a class. &amp;quot;Name&amp;quot; can be any valid identifier (see Valid Identifiers...). The name will be used to create objects (more later...). Here is what you type to create a class, as for now, and all you must worry about:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class NAME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
NAME, again,is the identifier.  (Java is case sensitive; so NAME is different from Name.  Industry convention suggest naming classes using mixed case, starting with an uppercase letter.[http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html]  For example:  NameNumberTwo)&lt;br /&gt;
&lt;br /&gt;
Classes also have a body - where you actually put the things. To create the body you have a { and }. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class NAME&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This, essentially creates a class. All the code goes between the {, called the opening brace, and the }, called the closing brace.&lt;br /&gt;
&lt;br /&gt;
=Protection=&lt;br /&gt;
{{Template:confusing|December 2006}}&lt;br /&gt;
Java allows you to abstract the internal data of a class from other code that uses that class. The idea here is to create a &amp;quot;black box&amp;quot; effect, where classes that use your class have no knowledge of the internal workings of the class. This simplifies changing the class if done consistently, as other classes don&#039;t depend on anything within the class.&lt;br /&gt;
&lt;br /&gt;
There are three &#039;&#039;&#039;access modifiers&#039;&#039;&#039; and four &#039;&#039;&#039;access levels&#039;&#039;&#039; (one level is the default, used when no modifier appears). If your class attempts to access another class, it will only be able to if it is allowed access. If you don&#039;t have access to the code you&#039;re trying to access, the compiler will notice and you&#039;ll get a compile-time error. The four levels and three modifiers are as follows:&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;Modifier&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Level&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Accessible From&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;&lt;br /&gt;
| Private&lt;br /&gt;
| An object of the exact same class as the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Default&amp;lt;/code&amp;gt;&lt;br /&gt;
| Default; sometimes called &#039;&#039;package-private&#039;&#039;&lt;br /&gt;
| An object of the same package as the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt;&lt;br /&gt;
| Protected&lt;br /&gt;
| An object of the same or subclass of the declaring class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt;&lt;br /&gt;
| Public&lt;br /&gt;
| Anywhere&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;declaring class&#039;&#039; is the class containing the field, method, or nested class being modified. (For example, if the class &amp;lt;code&amp;gt;Foo&amp;lt;/code&amp;gt; contains a method &amp;lt;code&amp;gt;bar()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Foo&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;bar()&amp;lt;/code&amp;gt;&#039;s declaring class.)&lt;br /&gt;
&lt;br /&gt;
The protected and default levels deal with [[Java/Inheritance|inheritance]] and [[Java Deployment|packages]] respectively; these concepts are dealt with in later lessons. For now, declare all classes public (private classes are only useful — or even possible — when nested, and nested classes definitely comes later). Methods should be public if they&#039;re meant to be called by other classes. Declare a method private if it should only be called by its own class.&lt;br /&gt;
&lt;br /&gt;
=Statements=&lt;br /&gt;
All operations are done in statements. Every statement ends in a semicolon: ;. Statements can set a variable with the &#039;=&#039; operator. This sets the variable you wish to set to another variable or a value. Values can only be used on primitive types.  As you saw in the HelloWorld program, there was one statement: &amp;lt;code&amp;gt;System.out.println(&amp;quot;Hello, World&amp;quot;)&amp;lt;/code&amp;gt;. This is one type of statement called &amp;quot;calling a method&amp;quot;. More will be discussed later. Finally, you can declare a variable. If a class has no statements, it would do nothing.&lt;br /&gt;
&lt;br /&gt;
=Variables=&lt;br /&gt;
Variables are used to store information in a computer&#039;s memory. Like its name implies, variables are values that can be changed. There are two main categories of variables: reference variables and primitive variables. 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;
==Declaring Variables==&lt;br /&gt;
To declare a variable, use this syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[protection] [classname] [identifier]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is one type of statement. The class name is the type of variable you want. Currently, you will only use basic primitive variables, but you will learn about objects soon. Here is an example of declaring a variable:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public int myInt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
myInt has protection of public. It is of class int, or Integer (see Primitive Types). int is a class in Java. When you say that, you are basically making a primitive object.&lt;br /&gt;
&lt;br /&gt;
==Primitive Data Types==&lt;br /&gt;
Primitives are the simplest type of data. 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;
&lt;br /&gt;
Using what you have learned, You may have guessed how to create a long or double.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;long myLong;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;double myDouble;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
&lt;br /&gt;
===Assignment Operator &#039;=&#039;===&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. Essentially, a &#039;&#039;&#039;is&#039;&#039;&#039; now 6. You can also set a variable and declare it on the same line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int a = 6;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, you can&#039;t say &amp;lt;code&amp;gt;char myChar = y;&amp;lt;/code&amp;gt; to set a character to &#039;y&#039;. That would set the character variable &amp;lt;code&amp;gt;myChar&amp;lt;/code&amp;gt; to the value stored in the character variable &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;. To set &amp;lt;code&amp;gt;myChar&amp;lt;/code&amp;gt; equal to the character &amp;lt;i&amp;gt;y&amp;lt;/i&amp;gt;, use a &#039;&#039;&#039;character literal&#039;&#039;&#039; — a technical term for &amp;quot;a character in single-quotes&amp;quot;: &amp;lt;code&amp;gt;char myChar = &#039;y&#039;;&amp;lt;/code&amp;gt;. Note that a &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt; primitive can only hold a single character. &amp;lt;code&amp;gt;char myChar = &#039;Yo&#039;;&amp;lt;/code&amp;gt; is illegal.&lt;br /&gt;
&lt;br /&gt;
Finally, what&#039;s so special about &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;s and &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;s? Doubles and floats can have decimals: &amp;lt;code&amp;gt;float myFloat = 5.1;&amp;lt;/code&amp;gt;. (The term &amp;quot;float&amp;quot; is short for &amp;quot;floating-point number,&amp;quot; referring to the decimal point.)&lt;br /&gt;
&lt;br /&gt;
Now, why would you want to set a variable? For further use, ie, to access at a later time. For example, you can do calculations with other operators...&lt;br /&gt;
&lt;br /&gt;
===Addition Operator +===&lt;br /&gt;
The addition operator is different from the = operator. It does not set anything. You would need the = operator to do any setting.&lt;br /&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;
The Java Programming Language would use the order of operations in this example.&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut for subtracting a value from int myInt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
myInt -= 4;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Valid 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 $. Identifiers can be no longer than 32 characters.&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, listed below. [[Flashcards for Java keywords]] provides some assistance in memorizing the concepts behind specific keywords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 | &amp;lt;code&amp;gt;abstract&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;assert&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;break&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;byte&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;catch&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;const&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;continue&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;extends&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;final&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;finally&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;goto&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;implements&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;import&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;instanceof&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;interface&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;long&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;native&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;return&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;short&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;strictfp&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;super&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;switch&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;synchronized&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;throw&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;throws&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;transient&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;try&amp;lt;/code&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | &amp;lt;code&amp;gt;void&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;volatile&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;&lt;br /&gt;
 | &lt;br /&gt;
 | &lt;br /&gt;
 | &lt;br /&gt;
 |}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Identifiers should also be meaningful, while maintaining practicality. If calculating the sum of a set of numbers, &amp;lt;code&amp;gt;sum&amp;lt;code&amp;gt; is better than &amp;lt;code&amp;gt;cumulativeTotal&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt; might be too short.&lt;br /&gt;
&lt;br /&gt;
=Using the Displayer with Variables=&lt;br /&gt;
This section is about printing to the console using &amp;lt;code&amp;gt;System.out.println();&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For Strings, it is extremely simple:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(STRING IDENTIFIER HERE);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But for other variables, you have to do it like this:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(VARIABLE IDENT + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because that method&#039;s parameter requires a string, and to change a variable to a string you say +&amp;quot;&amp;quot;. Note that this only works on primitive types. On objects you have to have a method toString(), which we will learn about later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(54 + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do multiple variables on the same line:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(false + 54 + &amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can put it anywhere: &amp;lt;code&amp;gt;System.out.println(false + &amp;quot;&amp;quot; + 54)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this won&#039;t work for two literal numeric values:&lt;br /&gt;
&amp;lt;code&amp;gt;System.out.println(54 + 32)&amp;lt;/code&amp;gt;. It would mistake it for the adding operator for values. For strings, the operator is different. So you would have to do: &amp;lt;code&amp;gt;System.out.println(54+&amp;quot;&amp;quot;+32)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can do calculations and print the result! For example, say you want to print 6*6*6*6. Here is the code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class Multiplying&lt;br /&gt;
{&lt;br /&gt;
  public static void main(String args[])&lt;br /&gt;
  {&lt;br /&gt;
    int a = 6;&lt;br /&gt;
    int b = a*a*a*a;&lt;br /&gt;
    System.out.println(b + &amp;quot;&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
A multiline comment that opens with two asterisks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Like this */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is called a &#039;&#039;&#039;javadoc comment&#039;&#039;&#039;. As a general rule, don&#039;t use these unless you mean to run the javadoc program on your code.&lt;br /&gt;
&lt;br /&gt;
=Compiling and Running your program=&lt;br /&gt;
To compile your program, go to the directory you saved it. Note that if your class was named NaMe then your file &#039;&#039;&#039;must&#039;&#039;&#039; be named NaMe.java. Anyways, type: &amp;lt;code&amp;gt;javac NaMe.java&amp;lt;/code&amp;gt; where NaMe is your class name. To run, type &amp;lt;code&amp;gt;java NaMe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that if the compiler reports syntax errors with your code, you must look in your source code and fix them. These are usually typos, but can be missing colons (;) or other formatting issues.&lt;br /&gt;
&lt;br /&gt;
If, when running, it reports invalid class file, the compiler might not have created a file. It should have given an error message at compile time.&lt;br /&gt;
&lt;br /&gt;
=Asking the User=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In order for the following to work properly, you must place the following code on the first line of your .java file. Importing packages will be explained later.&#039;&#039;&lt;br /&gt;
  import javax.swing.JOptionPane;&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s go on to asking the user to enter a number and doing calculations on it. Basically: &amp;lt;code&amp;gt;JOptionPane.showInputDialog(null, &amp;quot;Hello. Enter something&amp;quot;)&amp;lt;/code&amp;gt;. Try putting that in a class (in the main method, of course) and run it. Currently, we can&#039;t do anything with it because the value is deleted.&lt;br /&gt;
&lt;br /&gt;
Because what you enter can consist of letters OR numbers, and any length of them, what is &amp;quot;produced&amp;quot; by that is a String. The following will work: &amp;lt;code&amp;gt;String mine = JOptionPane.showInputDialog(null, &amp;quot;Now I can set a String!&amp;quot;);&amp;lt;/code&amp;gt;. Now lets say that after you get the string you want to print it. Just like regularly, add the following line: &amp;lt;code&amp;gt;System.out.println(mine);&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now you probably want to be able to enter a number. Java provides a method of changing a String to an int. It is Integer.parseInt(String_Here);. So lets say you want the user to enter a number and you print it. Do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int mine = Integer.parseInt(JOptionPane.showInputDialog(null, &amp;quot;Now I can set an INTEGER!&amp;quot;));&lt;br /&gt;
System.out.println(mine);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And now, of course, you can do whatever you want with that...&lt;br /&gt;
&lt;br /&gt;
=Exercises=&lt;br /&gt;
A. Create a program that stores a String with the value &amp;quot;ABC&amp;quot;. Then print the value using System.out.println(StringIdentifierHere). Don&#039;t use System.out.prinln(&amp;quot;ABC&amp;quot;), as we are focusing on creating variables.&lt;br /&gt;
&lt;br /&gt;
B. Do the above with a long set to 10000. Note that you have to say System.out.println(LongIdentifier + &amp;quot;&amp;quot;).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;!--[[Topic:Java|Back to Java Main Page]] | [[Introduction_to_Java|Previous Lesson]] | [[Java_Decision_Structures|Next Lesson]]--&amp;gt;&lt;br /&gt;
{{1lvlnav|[[Topic:Java|Java]]|[[Introduction to Java]]|[[Java Decision Structures]]}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Learning activities]]&lt;/div&gt;</summary>
		<author><name>194.81.160.1</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:Fanboy&amp;diff=54872</id>
		<title>Archive:Fanboy</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:Fanboy&amp;diff=54872"/>
		<updated>2006-05-18T11:53:19Z</updated>

		<summary type="html">&lt;p&gt;194.81.36.9: /* Video game fanboys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Fanboy&#039;&#039;&#039; or &#039;&#039;&#039;fanboi&#039;&#039;&#039; is a term used to describe an individual (though the femanine version &#039;&#039;fangirl&#039;&#039; may be used for girls or women) who is utterly devoted to a single subject or [[hobby]], often to the point where it is considered an [[obsession]]. &lt;br /&gt;
&lt;br /&gt;
==History of fanboys and the term==&lt;br /&gt;
The term originated in [[comic book]] circles, to describe someone who immersed himself in the fictional worlds of comics and the culture of comics fandom.  The term is often used in a derogatory manner by other less obsessed fans.  In the songs of the fannish [[parody]] [[musician]] [[Luke Ski]], many characters proudly consider themselves &#039;&#039;fanboys&#039;&#039;.  The term is most commonly associated with adolescent and teen males but can be applicable to any age or sex.  Common subjects of reverence by fanboys are [[TV show]]s, [[film|movie]]s, [[anime]], [[car]]s, [[video game console]]s, [[video games]], [[operating system]]s, [[MMORPG]]s, and [[software]] companies.&lt;br /&gt;
 &lt;br /&gt;
The stereotypical image of the fanboy is as an unkempt, socially awkward, young man who may be perceived as a loud mouthed [[pseudo-intellectual]].  A popular depiction of this stereotype is the [[Comic Book Guy]] on &#039;&#039;[[The Simpsons]]&#039;&#039;.  In the mid [[1990s]], the emergence of [[slacker]] culture changed this image somewhat.  Movies such as [[Kevin Smith]]&#039;s Jersey Trilogy (&#039;&#039;[[Clerks]]&#039;&#039;, &#039;&#039;[[Mallrats]]&#039;&#039;, and &#039;&#039;[[Chasing Amy]]&#039;&#039;), altered the image of the fanboy{{fact}}.  As electronic entertainment gained popularity, the term became increasingly applied to video gamers and television addicts who readily labelled themselves.&lt;br /&gt;
 &lt;br /&gt;
The earliest use of the word &amp;quot;fanboy&amp;quot; has been dated to 1982, to the cover of the &amp;quot;Official Underground and Newave Comix Price Guide&amp;quot;.  On this cover page are sketched overweight, overzealous comic book collectors wearing T-shirts that state &amp;quot;Fanboys of America,&amp;quot; and are describing the extreme measures they would go to, including moving to San Francisco, to preserve their comics.  Another early use is in a smart-alec editorial reply by &amp;quot;[[Ambush Bug]]&amp;quot; to a letter in his comic in [[1985]].  &lt;br /&gt;
 &lt;br /&gt;
Fanboys can be zealously committed to their particular narrow area of interest, to the exclusion and derision of competing or similar products, regardless of their merits.  Fanboys are often perceived as possessing a [[sycophant]]ic devotion to the creators behind the object of their passion.  An obsession may be short or long term and, at times, aggressively defended. One example of this is [[Harry Knowles]] and his associates at [[Ain&#039;t It Cool News]], whose particular focus is on [[film|movies]] in the [[action movie|action]], [[fantasy]], adventure and [[superhero]] genres.  Fanboys are noted for a very emotional attachment to their chosen subject, often taking negative remarks about it as a personal attack.  They may readily engage in debates, but will fall back on emotional responses.  For example, a &amp;quot;fanboy&amp;quot; may go out of their way to point out negative and often untrue statements about their obsession&#039;s rivals; this is commonly known as [[fear, uncertainty and doubt|FUD]].&lt;br /&gt;
 &lt;br /&gt;
More recently, especially in the [[video game industry]], fans of a particular [[video game console]] manufacturer have begun exhibiting slavish devotion to their brand of choice.  Conversely they hold an unreasonable amount of animosity towards the other brands which they consider to be competition.  They are extremely rude to fans of the other companies or even people who don’t hail complete and utter devotion to the object of their fanaticism.  These people seek out every opportunity to annoy others whose opinions differ from theirs.  This trend has led to the term “fanboy” deriving a more and more negative connotation.&lt;br /&gt;
&lt;br /&gt;
==Some common types of fanboys==&lt;br /&gt;
Note that, by their very nature, the following lists are generalizations and stereotypes of the characteristics commonly found or believed to be found in &#039;fanboys&#039;.&lt;br /&gt;
&lt;br /&gt;
===Video game fanboys===&lt;br /&gt;
After comic books, video games may be the most fruitful environment for fanboys. These include:&lt;br /&gt;
*[[Nintendo]] Fanboys (sometimes called a &amp;quot;Ninty&amp;quot; or &amp;quot;Drone&amp;quot;, short for &amp;quot;Nintendrone&amp;quot;, also &amp;quot;Nintendophile&amp;quot;, and &amp;quot;Snerd&amp;quot;, the last one for the [[SNES]] game console and the term [[nerd]]) a more recent (and unpleasent) term is &amp;quot;&#039;&#039;Wiiners&#039;&#039;&amp;quot; (from &amp;quot;Wiener&amp;quot; and Nintendo&#039;s new console, the [[Wii]]).&lt;br /&gt;
*[[Sony]] Fanboys (sometimes called &amp;quot;Tools&amp;quot;, short for &amp;quot;PSTool&amp;quot; which is derived from Sony&#039;s current entertainment console, the [[PS2]])&lt;br /&gt;
*[[Xbox]] Fanboys (sometimes called &amp;quot;Xbots&amp;quot;)&lt;br /&gt;
*[[Sega]] Fanboys&lt;br /&gt;
*[[Final Fantasy]] Fanboys (want the series to continue forever)&lt;br /&gt;
&lt;br /&gt;
On the [[GameSpot]] System Wars forum, as well as SystemWars.com [http://www.systemwars.com/forums/], the different schools of video game fanboys are associated with various animals. Nintendo fanboys are called &amp;quot;[[sheep]]&amp;quot; because of their perceived willingness to be herded by Nintendo. Sony fanboys are called &amp;quot;[[Cattle|cows]]&amp;quot; because of the perception they pay extra, i.e. are &amp;quot;milked&amp;quot; by Sony for optional features for their equipment of choice. Microsoft fanboys are called &amp;quot;[[Lemming|lemmings]]&amp;quot; because of the perception they follow Microsoft blindly, even if it leads to their demise. Similarly, PC fanboys are called &amp;quot;[[hermits]]&amp;quot; because they are perceived as solitary, friendless gamers who play by themselves.&lt;br /&gt;
&lt;br /&gt;
===Anime fanboys===&lt;br /&gt;
Anime is another fertile breeding ground for fanboys. Some notable examples are:&lt;br /&gt;
*[[Dragon Ball]] Fanboys (get hung up on names, especially [[romaji]])&lt;br /&gt;
*[[Sailor Moon]] Fanboys (very strict about [[manga]] continuity)&lt;br /&gt;
*[[Inuyasha]] Fangirls (generally, they&#039;re all [[female]], but display all the traits of fanboys)&lt;br /&gt;
&lt;br /&gt;
===Computer software/hardware fanboys===&lt;br /&gt;
* [[Linux]] Fanboys - Love open source. Stereotyped as viewing Microsoft as the ultimate evil.&lt;br /&gt;
* [[Mac]] Fanboys - The &amp;quot;[[Cult of Mac]]&amp;quot;. Devoted to the Macintosh, both as hardware and as an operating system (especially [[Mac OS X]]), to Apple&#039;s hardware devices (such as [[IPod|iPods]]), and to Apple&#039;s various other software and hardware products. Emphasize ease-of-use over complex features.&lt;br /&gt;
* [[Microsoft]] Fanboys - Devoted to the [[Microsoft Windows]] operating system, the software available for it (such as [[Microsoft Office]]), and various Microsoft hardware products (such as the [[Xbox]]). Focus on the fact that the majority of PC software, in particular [[Personal computer game|PC games]], is compatible only or primarily with Microsoft Windows. Deride Apple fans as simpletons.&lt;br /&gt;
* [[ATI Technologies|ATI]] Fanboys - Often boast that their graphics cards have greater image quality. Refer to [[Nvidia]] fans as &amp;quot;Nvidiots&amp;quot;. &lt;br /&gt;
* [[Nvidia]] Fanboys - Refer to [[ATI Technologies|ATI]] fans as &amp;quot;FanATIcs&amp;quot;  (should not be confused with AEG sponsored posters, who receive indirect compensation as a reward to subtle promotion of NVidia&#039;s products)&lt;br /&gt;
* [[Google]] Fanboys - Devoted to the corporation that produced the Google.com search engine.  They are ceaselessly bullish on Google&#039;s future, insist that Google will eventually unseat Microsoft as the most dominant technology company, consider Google&#039;s stock a bargain at any price and tirelessly argue against any insinuation that Google is ignoring its informal corporate motto &amp;quot;Don&#039;t Be Evil.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Fanboys can be a mnemonic for the conjunctions of the English language, &amp;quot;for&amp;quot;, &amp;quot;and&amp;quot;, &amp;quot;nor&amp;quot;, &amp;quot;but&amp;quot;, &amp;quot;or&amp;quot;, &amp;quot;yet&amp;quot;, and &amp;quot;so&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==In Media==&lt;br /&gt;
===Comic Book===&lt;br /&gt;
*[[Sergio Aragonés]]&#039; &#039;&#039;Fanboy&#039;&#039;&lt;br /&gt;
*Doug Holverson&#039;s &#039;Fanboy&#039; (anthropomorphized rotary fan obsessed with comics, who uses his electrical plug for a hand).  Dates from the prolific minicomic wave of the 1980s.&lt;br /&gt;
&lt;br /&gt;
===Television===&lt;br /&gt;
*[[The Simpsons]]&#039; [[Comic Book Guy]]&lt;br /&gt;
*[[Freakazoid]]&#039;s [[Fan Boy]]&lt;br /&gt;
&lt;br /&gt;
===Radio/Podcasts===&lt;br /&gt;
*[[Fanboy Radio]] - [http://fanboyradio.com]&lt;br /&gt;
*Drooling FanBoy - [http://droolingfanboy.com]&lt;br /&gt;
&lt;br /&gt;
===Webcomics===&lt;br /&gt;
*[[Fanboy Almanac (webcomic)]] - [http://fanboyalmanac.com Fanboy Almanac]&lt;br /&gt;
*[http://www.ngeb.net/fanboys Fanboys web comic]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[addiction]]&lt;br /&gt;
* [[otaku]]&lt;br /&gt;
* [[anorak (slang)|anorak]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Fandom]]&lt;br /&gt;
[[Category:Anime and manga terminology]]&lt;br /&gt;
&lt;br /&gt;
[[de:Fanboy]]&lt;/div&gt;</summary>
		<author><name>194.81.36.9</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:Fanboy&amp;diff=54871</id>
		<title>Archive:Fanboy</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:Fanboy&amp;diff=54871"/>
		<updated>2006-05-18T11:49:22Z</updated>

		<summary type="html">&lt;p&gt;194.81.36.9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Fanboy&#039;&#039;&#039; or &#039;&#039;&#039;fanboi&#039;&#039;&#039; is a term used to describe an individual (though the femanine version &#039;&#039;fangirl&#039;&#039; may be used for girls or women) who is utterly devoted to a single subject or [[hobby]], often to the point where it is considered an [[obsession]]. &lt;br /&gt;
&lt;br /&gt;
==History of fanboys and the term==&lt;br /&gt;
The term originated in [[comic book]] circles, to describe someone who immersed himself in the fictional worlds of comics and the culture of comics fandom.  The term is often used in a derogatory manner by other less obsessed fans.  In the songs of the fannish [[parody]] [[musician]] [[Luke Ski]], many characters proudly consider themselves &#039;&#039;fanboys&#039;&#039;.  The term is most commonly associated with adolescent and teen males but can be applicable to any age or sex.  Common subjects of reverence by fanboys are [[TV show]]s, [[film|movie]]s, [[anime]], [[car]]s, [[video game console]]s, [[video games]], [[operating system]]s, [[MMORPG]]s, and [[software]] companies.&lt;br /&gt;
 &lt;br /&gt;
The stereotypical image of the fanboy is as an unkempt, socially awkward, young man who may be perceived as a loud mouthed [[pseudo-intellectual]].  A popular depiction of this stereotype is the [[Comic Book Guy]] on &#039;&#039;[[The Simpsons]]&#039;&#039;.  In the mid [[1990s]], the emergence of [[slacker]] culture changed this image somewhat.  Movies such as [[Kevin Smith]]&#039;s Jersey Trilogy (&#039;&#039;[[Clerks]]&#039;&#039;, &#039;&#039;[[Mallrats]]&#039;&#039;, and &#039;&#039;[[Chasing Amy]]&#039;&#039;), altered the image of the fanboy{{fact}}.  As electronic entertainment gained popularity, the term became increasingly applied to video gamers and television addicts who readily labelled themselves.&lt;br /&gt;
 &lt;br /&gt;
The earliest use of the word &amp;quot;fanboy&amp;quot; has been dated to 1982, to the cover of the &amp;quot;Official Underground and Newave Comix Price Guide&amp;quot;.  On this cover page are sketched overweight, overzealous comic book collectors wearing T-shirts that state &amp;quot;Fanboys of America,&amp;quot; and are describing the extreme measures they would go to, including moving to San Francisco, to preserve their comics.  Another early use is in a smart-alec editorial reply by &amp;quot;[[Ambush Bug]]&amp;quot; to a letter in his comic in [[1985]].  &lt;br /&gt;
 &lt;br /&gt;
Fanboys can be zealously committed to their particular narrow area of interest, to the exclusion and derision of competing or similar products, regardless of their merits.  Fanboys are often perceived as possessing a [[sycophant]]ic devotion to the creators behind the object of their passion.  An obsession may be short or long term and, at times, aggressively defended. One example of this is [[Harry Knowles]] and his associates at [[Ain&#039;t It Cool News]], whose particular focus is on [[film|movies]] in the [[action movie|action]], [[fantasy]], adventure and [[superhero]] genres.  Fanboys are noted for a very emotional attachment to their chosen subject, often taking negative remarks about it as a personal attack.  They may readily engage in debates, but will fall back on emotional responses.  For example, a &amp;quot;fanboy&amp;quot; may go out of their way to point out negative and often untrue statements about their obsession&#039;s rivals; this is commonly known as [[fear, uncertainty and doubt|FUD]].&lt;br /&gt;
 &lt;br /&gt;
More recently, especially in the [[video game industry]], fans of a particular [[video game console]] manufacturer have begun exhibiting slavish devotion to their brand of choice.  Conversely they hold an unreasonable amount of animosity towards the other brands which they consider to be competition.  They are extremely rude to fans of the other companies or even people who don’t hail complete and utter devotion to the object of their fanaticism.  These people seek out every opportunity to annoy others whose opinions differ from theirs.  This trend has led to the term “fanboy” deriving a more and more negative connotation.&lt;br /&gt;
&lt;br /&gt;
==Some common types of fanboys==&lt;br /&gt;
Note that, by their very nature, the following lists are generalizations and stereotypes of the characteristics commonly found or believed to be found in &#039;fanboys&#039;.&lt;br /&gt;
&lt;br /&gt;
===Video game fanboys===&lt;br /&gt;
After comic books, video games may be the most fruitful environment for fanboys. These include:&lt;br /&gt;
*[[Nintendo]] Fanboys (sometimes called a &amp;quot;Ninty&amp;quot; or &amp;quot;Drone&amp;quot;, short for &amp;quot;Nintendrone&amp;quot;, also &amp;quot;Nintendophile&amp;quot;, and &amp;quot;Snerd&amp;quot;, the last one for the [[SNES]] game console and the term [[nerd]])&lt;br /&gt;
*[[Sony]] Fanboys (sometimes called &amp;quot;Tools&amp;quot;, short for &amp;quot;PSTool&amp;quot; which is derived from Sony&#039;s current entertainment console, the [[PS2]])&lt;br /&gt;
*[[Xbox]] Fanboys (sometimes called &amp;quot;Xbots&amp;quot;)&lt;br /&gt;
*[[Sega]] Fanboys&lt;br /&gt;
*[[Final Fantasy]] Fanboys (want the series to continue forever)&lt;br /&gt;
&lt;br /&gt;
On the [[GameSpot]] System Wars forum, as well as SystemWars.com [http://www.systemwars.com/forums/], the different schools of video game fanboys are associated with various animals. Nintendo fanboys are called &amp;quot;[[sheep]]&amp;quot; because of their perceived willingness to be herded by Nintendo. Sony fanboys are called &amp;quot;[[Cattle|cows]]&amp;quot; because of the perception they pay extra, i.e. are &amp;quot;milked&amp;quot; by Sony for optional features for their equipment of choice. Microsoft fanboys are called &amp;quot;[[Lemming|lemmings]]&amp;quot; because of the perception they follow Microsoft blindly, even if it leads to their demise. Similarly, PC fanboys are called &amp;quot;[[hermits]]&amp;quot; because they are perceived as solitary, friendless gamers who play by themselves.&lt;br /&gt;
&lt;br /&gt;
===Anime fanboys===&lt;br /&gt;
Anime is another fertile breeding ground for fanboys. Some notable examples are:&lt;br /&gt;
*[[Dragon Ball]] Fanboys (get hung up on names, especially [[romaji]])&lt;br /&gt;
*[[Sailor Moon]] Fanboys (very strict about [[manga]] continuity)&lt;br /&gt;
*[[Inuyasha]] Fangirls (generally, they&#039;re all [[female]], but display all the traits of fanboys)&lt;br /&gt;
&lt;br /&gt;
===Computer software/hardware fanboys===&lt;br /&gt;
* [[Linux]] Fanboys - Love open source. Stereotyped as viewing Microsoft as the ultimate evil.&lt;br /&gt;
* [[Mac]] Fanboys - The &amp;quot;[[Cult of Mac]]&amp;quot;. Devoted to the Macintosh, both as hardware and as an operating system (especially [[Mac OS X]]), to Apple&#039;s hardware devices (such as [[IPod|iPods]]), and to Apple&#039;s various other software and hardware products. Emphasize ease-of-use over complex features.&lt;br /&gt;
* [[Microsoft]] Fanboys - Devoted to the [[Microsoft Windows]] operating system, the software available for it (such as [[Microsoft Office]]), and various Microsoft hardware products (such as the [[Xbox]]). Focus on the fact that the majority of PC software, in particular [[Personal computer game|PC games]], is compatible only or primarily with Microsoft Windows. Deride Apple fans as simpletons.&lt;br /&gt;
* [[ATI Technologies|ATI]] Fanboys - Often boast that their graphics cards have greater image quality. Refer to [[Nvidia]] fans as &amp;quot;Nvidiots&amp;quot;. &lt;br /&gt;
* [[Nvidia]] Fanboys - Refer to [[ATI Technologies|ATI]] fans as &amp;quot;FanATIcs&amp;quot;  (should not be confused with AEG sponsored posters, who receive indirect compensation as a reward to subtle promotion of NVidia&#039;s products)&lt;br /&gt;
* [[Google]] Fanboys - Devoted to the corporation that produced the Google.com search engine.  They are ceaselessly bullish on Google&#039;s future, insist that Google will eventually unseat Microsoft as the most dominant technology company, consider Google&#039;s stock a bargain at any price and tirelessly argue against any insinuation that Google is ignoring its informal corporate motto &amp;quot;Don&#039;t Be Evil.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Fanboys can be a mnemonic for the conjunctions of the English language, &amp;quot;for&amp;quot;, &amp;quot;and&amp;quot;, &amp;quot;nor&amp;quot;, &amp;quot;but&amp;quot;, &amp;quot;or&amp;quot;, &amp;quot;yet&amp;quot;, and &amp;quot;so&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==In Media==&lt;br /&gt;
===Comic Book===&lt;br /&gt;
*[[Sergio Aragonés]]&#039; &#039;&#039;Fanboy&#039;&#039;&lt;br /&gt;
*Doug Holverson&#039;s &#039;Fanboy&#039; (anthropomorphized rotary fan obsessed with comics, who uses his electrical plug for a hand).  Dates from the prolific minicomic wave of the 1980s.&lt;br /&gt;
&lt;br /&gt;
===Television===&lt;br /&gt;
*[[The Simpsons]]&#039; [[Comic Book Guy]]&lt;br /&gt;
*[[Freakazoid]]&#039;s [[Fan Boy]]&lt;br /&gt;
&lt;br /&gt;
===Radio/Podcasts===&lt;br /&gt;
*[[Fanboy Radio]] - [http://fanboyradio.com]&lt;br /&gt;
*Drooling FanBoy - [http://droolingfanboy.com]&lt;br /&gt;
&lt;br /&gt;
===Webcomics===&lt;br /&gt;
*[[Fanboy Almanac (webcomic)]] - [http://fanboyalmanac.com Fanboy Almanac]&lt;br /&gt;
*[http://www.ngeb.net/fanboys Fanboys web comic]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[addiction]]&lt;br /&gt;
* [[otaku]]&lt;br /&gt;
* [[anorak (slang)|anorak]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Fandom]]&lt;br /&gt;
[[Category:Anime and manga terminology]]&lt;br /&gt;
&lt;br /&gt;
[[de:Fanboy]]&lt;/div&gt;</summary>
		<author><name>194.81.36.9</name></author>
	</entry>
</feed>