- Writing down material improves memory retention, which is why this is a good technique to use for recording important content.
- Make it clear to students what information should be written down (e.g., ArrayList instantiation, ArrayList methods, etc.).
- Build small topic sections for students to use so that their notebooks are well organized and easy to find information in.
- This is preferable to having students write all their notes for a topic, like ArrayList, under one large section.
- This also allows for easy review of syntax later in the course
- If you want students to use a specific template, be sure to provide it to them.
- Review notebooks in class to ensure that everyone knows what should have been written down.
- Writing these things down gives students practice handwriting code, which is a very useful tool.
- This tool is particularly helpful for the Free Response section of AP CS A exam, though it also can help facilitate easier communication with other code writers.
- Check out the example notebook entry on arrays in Java for a template to have students use:
index | 0 | 1 | 2 | 3 | 4 |
value | 0 | 0 | 0 | 0 | 0 |
String[] student = {"daniel","mark","mike","robert"};
0 | 1 | 2 | 3 |
daniel | mark | mike | robert |
Access: Generic syntax for one spot (index) in the array: nameOfArray[index] Example: System.out.println(student[0]); ⇒ prints daniel arr[3] = 7;⇒ assigns the value 7 to spot 3. Generic call to return the number of items in array: name.length Example: System.out.println(student.length) ⇒ prints 4 **WATCH OUT** arr[arr.length] ⇒ OUT OF BOUNDS ERROR! arr[arr.length-1]⇒ Correct, fixes the out of bounds error. Accessing all elements of array (Printing): for(int i=0;i<arr.length; i++) System.out.println(arr[i]); Advanced for loop to print: for(int val:arr) System.out.println(val); Typical algorithms used with an array: //not shown, but could include finding biggest value, smallest value.