Section 1

Preview this deck

new

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (14)

Section 1

(14 cards)

new

Front

Java object can be created programmatically (from within your code) by using the new keyword.

Back

Comments

Front

Comments are written into the source code as explanations for human readers. They are ignored by the computer.

Back

Instance variable

Front

Instance variable (also called fields) can be used to store imformation (object or values) for later use.

Back

equal

Front

We can test whether two thing are equal by using a double equal symbol:==.

Back

if/else statement

Front

The if/else statement executes a segment of code when a given condition is true, and a different segment of code when it is false.

Back

assignment statement

Front

An assignment statement assigned an object or value to a variable.

Back

static

Front

Methods that belong to classes (as opposed to objects) are marked with the keyword static in their signature. They are also called class methods

Back

GreenfootImage

Front

Greenfoot actors maintain their visible image by holding an object of type GreenfootImage. These are stored in an instance variable inherited from class Actor

Back

constructor

Front

A constructor of a class is a special kind of method that is executed automatically whenever a new instance is created

Back

dot notation

Front

when a methods we wish to call is not in our own class or inherited, we need to specify the class or object that has the method before the method name, followed by a dot. This is called dot notation

Back

method definition

Front

A method definition defines a new action for object of this class. The action is not immediately executed, but the method can be called with a method call later to execute it.

Back

class methods

Front

Methods that belong to classes (as opposed to objects) are marked with the keyword static in their signature. They are also called class methods

Back

API Documentation

Front

The API Documentation lists all classes and method available in Greenfoot. We often need to look up methods here.

Back

reference

Front

When an object is assigned to a variable, the contains a reference to the object.

Back