Aim: Creating Arrays
Declaring an array creates a reference to that array.
Example: int prices;
When you initialize an array, each element is set to null.
Example: prices = new int;
An array can be declared and initialized in one statement.
Aim: What is a variable?
A variable is a named container that holds a value.
When you introduce a variable, you tell the computer what type it is, what its name is,
and what value it has.
Example: int wormsEaten = 2;
You can introduce a vari
Aim: What are String Methods?
Date: October 22, 2015
The String class comes with a lot of methods already defined
String name = "John";
Returns the length of a string.
Example: name.length() = 4
String substring(int begin
Aim: What are For Loops?
for is a shorthand that combines in one statement initialization, testing, and change:
for loop structure:
for (initialization; condition; change)
Aim: What are While Loops?
Aim: What is a String?
Date: October 16, 2015
A string is an object of the String class.
Strings are always in double quotes.
Example: String date = "October 17";
The length of a string is how many characters are in the string.
The length of
Aim: What are 2D Arrays?
Date: March 31, 2016
2-D arrays are used to represent tables, matrices, game boards, images, etc.
An element of a 2-D array is addressed using a pair of indices, row and column.
Example: board[r][c] = "x";
Rows run l
Aim: What are methods?
September 18, 2015
A method is a function or a procedure that performs a certain task.
All of the objects in a given class have exactly the same methods.
When you create a method, you must use a method header that contain
Aim: What is Java?
Basic Java Facts
Java is a high-level programming language
People understand Java source code, computers understand machine code
When you compile a program:
Java source code->Java bytecode->machine code
Programs called Integrated D