Lecture 8 Flashcards
1
Q
When do you get an ArrayIndexOutOfBoundException?
A
When you try to access an element of an array, that is not yet initialized or doesn’t exist (due to too little memory allocation).
2
Q
What is JavaDoc
A
A formalized way of commenting your code
3
Q
What JavaDoc “Elements” do we use and what for?
A
@author: name of the programmer (at the start of the program)
@param: specifies parameters in a method
@return: specifies what a method returns
@throws: specifies what exceptions a method throws and what this exception “means” (a.k.a. when is it thrown)