Background
jLogo Programming
 Commanding a Turtle
 Pseudocode
 Adding New Commands
 Iteration & Animation
 Hierarchical Structure
 Procedure Inputs
 Operators & Expressions
 Defining Operators
 Words & Sentences
 User Interface Events
 What If? (Predicates)
 Recursion
 Local Variables
 Global Variables
 Word/Sentence Iteration
 Mastermind Project
 Turtles As Actors
 Arrays
 File Input/Output
Java
 A Java Program
 What's a Class?
 Extending Existing Classes
 Types
 Turtle Graphics
 Control Flow
 User Interface Events
Appendices
 Jargon
 TG Directives
 jLogo Primitives
 TG Editor
 Java Tables
 Example Programs
 *** New ***:
Installation Notes
Updates
 December 13, 2008
 January 6, 2012
 March 15, 2013
 January 20, 2014
 February 13, 2014
 July 29, 2014
 January 18, 2016
 January 29, 2016
 August 19, 2016
Lastly
Java Operators
Operators are mostly special characters, with a couple keywords thrown in, that make something happen.
 Connector

"the dot" connects classes and objects to members. The places where you use it in what I cover are:
(1) when you are connecting an object reference variable to a method. The Extending Existing Classes lesson introduces the dot operator for this use, and
(2) when you are connecting a class name to one of its static fields. An example of this is the dot between "System" and "out" in the statements we use to print stuff to the console window. System is the name of a class included in every Java implementation. It has an object reference variable that points to a PrintStream object for the console. So, "System.out.println( "text") invokes the println() method of the System.out object.
 Object Creation

builds objects for you. Objects are instantiations of classes and arrays. new is introduced in the Extending Existing Classes lesson.
 Assignment

is the basic assignment operator. The equalssign sits between what we call the "lefthandside" and the "righthandside" of the assignment expression.
lefthandside Op righthandside <variable> = <expression> text = "Harry Potter" number = 10 alphabet[0] = 'A' In all of the Java source we will cover, the righthandside will be an expression. The lefthandside will be the name (identifier) of a variable or an array expression which is a name followed by an index expression in square brackets.
The Java compiler will generate bytecode such that when the JVM executes the assignment expression, it
 computes the lefthandside (needed to finalize where we are storing the righthandside value,
 computes the righthandside value, and
 takes this value and stores it into the location we computed in step 1.
 Equality

sits between two things, compares them and produces true if they are identical or false if they are different.
The Java compiler will generate bytecode such that when the JVM executes the equality expression, it
 computes the value to the left of the equality operator (the doubleequalssign), then
 computes the value to the right, and finally
 compares these two values. If they are the same, the result is true, otherwise false.
So, the value it produces is boolean.
sits between two things, compares them and produces true if they are different or false if they are identical.
The Java compiler will generate bytecode such that when the JVM executes the inequality expression, it
 computes the value to the left of the inequality operator (the bangequalssign, aka exclamationequalssign, aka NOTequalssign), then
 computes the value to the right, and finally
 compares these two values. If they are different, the result is true, otherwise false.
So, the value it produces is boolean.
 Relational  Less Than

sits between two things, compares them and produces true if the thing on the left is less than the thing on the right, otherwise false.
The Java compiler will generate bytecode such that when the JVM executes the lessthan expression, it
 computes the value to the left of the lessthan operator ("<"), then
 computes the value to the right of it, and finally
 compares these two values. If the first is less than the second, the result is true, otherwise false.
So, the value it produces is boolean.
 Relational  Less Than or Equal To

sits between two things, compares them and produces true if the thing on the left is less than, or equal to the thing on the right, otherwise false.
The Java compiler will generate bytecode such that when the JVM executes the lessthanorequalto expression, it
 computes the value to the left of the operator ('<='), then
 computes the value to the right of it, and finally
 compares these two values. If the first is less than or equal to the second, the result is true, otherwise false.
So, the value it produces is boolean.
 Relational  Greater Than

sits between two things, compares them and produces true if the thing on the left is greater than the thing on the right, otherwise false.
The Java compiler will generate bytecode such that when the JVM executes the greaterthan expression, it
 computes the value to the left of the greaterthan operator ('>'), then
 computes the value to the right of it, and finally
 compares these two values. If the first is greater than the second, the result is true, otherwise false.
So, the value it produces is boolean.
 Relational  Greater Than or Equal To

sits between two things, compares them and produces true if the thing on the left is greater than, or equal to the thing on the right, otherwise false.
The Java compiler will generate bytecode such that when the JVM executes the greaterthanorequalto expression, it
 computes the value to the left of the operator ('>='), then
 computes the value to the right of it, and finally
 compares these two values. If the first is greater than or equal to the second, the result is true, otherwise false.
So, the value it produces is boolean.
 Logical  And

sits between two boolean things and replaces the pair of things with a single boolean value. The value produced is true only if both the left value AND the right value are true, otherwise false.
The Java compiler will generate bytecode such that when the JVM executes the logicaland expression, it
 computes the value to the left of the logicaland operator ('&&'), then
 if the value is false, it's done; the expression result is false, otherwise
 computes the value to the right of it and this value becomes the result.
NOTE that evaluation of the righthandside is NOT guaranteed. It may not happen.
So, the value it produces is boolean.
 Logical  Or

sits between two boolean things and replaces the pair of things with a single boolean value. The value produced is true if either the left value OR the right value is true, otherwise false if both the right and left are false.
The Java compiler will generate bytecode such that when the JVM executes the logicaland expression, it
 computes the value to the left of the logicalor operator (''), then
 if the value is true, it's done; the expression result is true, otherwise
 computes the value to the right of it and this value becomes the result.
NOTE that evaluation of the righthandside is NOT guaranteed. It may not happen.
So, the value it produces is boolean.
 Arithmetic  Addition

sits between two numeric things and replaces the pair of things with a single numeric value.
The Java compiler will generate bytecode such that when the JVM executes the addition expression, it
 computes the value to the left of the addition operator ('+'),
 computes the value to the right of the addition operator ('+'), then
 adds these two values
So, the value it produces is numeric.
 Arithmetic  Subtraction

sits between two numeric things and replaces the pair of things with a single numeric value.
The Java compiler will generate bytecode such that when the JVM executes the subtraction expression, it
 computes the value to the left of the subtraction operator (''),
 computes the value to the right of the subtraction operator (''), then
 subtracts the righthand value from the lefthand value
So, the value it produces is numeric.
 Arithmetic  Multiplication

sits between two numeric things and replaces the pair of things with a single numeric value.
The Java compiler will generate bytecode such that when the JVM executes the multiplication expression, it
 computes the value to the left of the multiplication operator ('*'),
 computes the value to the right of the multiplication operator ('*'), then
 computes the product of these two values
So, the value it produces is numeric.
 Arithmetic  Division, Quotient

sits between two numeric things and replaces the pair of things with a single numeric value.
The Java compiler will generate bytecode such that when the JVM executes the division expression, it
 computes the value to the left of the division operator ('/'),
 computes the value to the right of the division operator ('/'), then
 divides the lefthand value by the righthand value
So, the value it produces is numeric.
 Arithmetic  Division, Remainder

sits between two numeric things and replaces the pair of things with a single numeric value.
The Java compiler will generate bytecode such that when the JVM executes the division expression, it
 computes the value to the left of the division operator ('%'),
 computes the value to the right of the division operator ('%'), then
 divides the lefthand value by the righthand value
 the remainder produced by this division is the final value
So, the value it produces is numeric.
 Increment

when appended to a variable identifier, the variable is incremented by 1. Think of it as an abbreviation for the assignment statement:
variableIdentifier = variableIdentifer + 1;
 Decrement

when appended to a variable identifier, the variable is decremented by 1. Think of it as an abbreviation for the assignment statement:
variableIdentifier = variableIdentifer  1;