Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 4

Wee

k6
Introductie

• Methods/Instance Variables
• Dot Notation
• Parameters en Return values

1/4
Wee
k6
Methods&Variables

Public Class Person{


int age;

void fence(){…
}
}

2/4
Wee
k6
Dot Notation
Connect the dots <reference>.<inst_var>
The dots connect! <reference>.<method>
(Heel soms ook:
<classname>.<inst_var>
<classname>.<method>)

bv.
Person bassie = new Person()
bassie.fence();

(Maar soms ook:


Math.max(4,6);)

3/4
Wee
k6
Parameter/Return
makeChickenTajine

ChickenTajine makeChickenTajine(Ingredient
ingredient1, Ingredient2, …)
Return value: what
the method produces Parameters: what the method needs

4/4

You might also like