CSCI 201 002, 12 September
- Method signature
- Name and paramter type determine the method
- Two documented methods
public void forward()
public void forward(int pixels)
- Called as
slowPoke.forward()
slowPoke.forward(20)
- Method invocation
- arguments are passed to the method
- parameters are used within the method
- Lists of values
- Grades in your CSCI 201 lab
- Courses taken by your this semester
- Array
- Sometimes called vectors by mathematicians
- List of values
- Indexed by a number:
labGrade[i]
- Indexed from 0:
labGrade[0]
- Created with a size:
new int[10]
- Size stored in field:
labGrade.length
- Methods versus fields