Browse tutorials by Category - Array
Array Index Out Of Bounds (Command Line)
Time: 1:29
|
|
| Average: 60 ratings | Your Rating: |
| Categories: Array Runtime Error Logic Error Command Line | |
| Description: click for more...
This video shows the runtime error that results when an index references beyond the end of an array. IT points out that one should always look both at the line number in a runtime error and the index listed in an ArrayIndexOutOfBounds error. This error is fixed by changing the constant index values which are used to index the array. |
|
Array, Off By One Error (BlueJ)
Time: 7:04
|
|
| Average: 48 ratings | Your Rating: |
| Categories: Array Loop Logic Error BlueJ | |
| Description: click for more...
This video shows the problem of code that doesn’t produce the correct output because the loop has an off-by-one error when it processes the array to find an average. |
|
Linear Search of an Array (Eclipse)
Time: 9:08
|
|
| Average: 50 ratings | Your Rating: |
| Categories: Conditional Array Loop Logic Error Debugging Process Eclipse | |
| Description: click for more...
This video shows a program which is searching through an array, in a linear fashion, looking for a value. It has an if…else statement within a loop which assigns a boolean value to a variable called “found” every iteration of the loop (if theArray[index] == value). It shows that the code works for any value not in the array, but that it always reports “found” to be false, even for values that are in the array. By inserting print statements at the start of the if block and then in the else block, it shows that “found” is updated every iteration of the loop, potentially overwriting the assignment of true to “found.” |
|
Multiple Parameters and Return Values (Command Line)
Time: 10:00
|
|
| Average: 41 ratings | Your Rating: |
| Categories: Array Logic Error Command Line | |
| Description: click for more...
This video shows the problem of trying to return a value calculated in a method through a parameter, where the student is assuming that Java parameters are passed by reference. The video shows the process of returning two values from a method and how this can be accomplished with an array. |
|
Null Pointer Exception (Command Line)
Time: 4:01
|
|
| Average: 60 ratings | Your Rating: |
| Categories: Array Pointers Runtime Error Command Line | |
| Description: click for more...
Demonstration of a runtime, “Null Pointer exception” ( java.lang.NullPointerException) error and points out how to get the line number from the runtime error. It points out that many null pointer exceptions occur when an object has not been instantiated. This particular example happens in the context of an array where the array itself has been instantiated, but the objects that are elements of the array have not been instantiated. |
|
While Loop Doesn't Execute (Command Line)
Time: 2:20
|
|
| Average: 44 ratings | Your Rating: |
| Categories: Array Loop Logic Error Command Line | |
| Description: click for more...
While loop that either loops continually and never stops, appears to execute once, or doesn’t execute at all. |
|
Array Index out of Bounds (kommandorad)
Time: 1:32
|
|
| Average: 31 ratings | Your Rating: |
| Categories: Array Runtime Error Command Line | |
| Description: click for more...
ArrayIndexOutOfBound Exception (Sweedish) När man kör programmet så får man ett ArrayIndexOutOfBoundsException meddelande, den här videon beskriver vad du ska leta efter för att hitta felet. |
|
While-snurra exekveras inte (kommandorad)
Time: 7:14
|
|
| Average: 40 ratings | Your Rating: |
| Categories: Array Loop Logic Error Command Line | |
| Description: click for more...
Visar på ett program som tycks hänga sig när man kör det. Videon visar hur man använda sig av olika spårutskrifter för att försöka isolera felet. |
|