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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is JavaDoc

A

A formalized way of commenting your code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly