Comments and Debugging Flashcards

1
Q

used for a single line comment

A

//

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

used for a multiline comment

A

/* … */

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

used for documentation (JavaDoc)

A

/** … */

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

Comments are used to provide information on:

A

classes, methods, constructors, and more and often use the @ to tag stuff

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

Debugging is…

A

is the process of finding current and potential issues, then removing or resolving them

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

types of errors

A

syntax - code will not compile
runtime -code compiles and can create exceptions
logical - code runs but doesn’t do what is expected

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

what is an exception?

A

An exception is an event that happens while a program is running. It disrupts the normal flow of instructions.

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

NullPointerException is caused when…..

A

is caused when you attempt to use reference type objects before they are initialized.

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

ArrayIndexOutOfBoundsException is caused…..

A

is caused when you try to access an index of an Array that does not exist.

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

@param and @return are?

A

@param and @return are two commonly used Javadoc tags used in Java to document methods and functions.

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

The @param tag is used to…..

A

The @param tag is used to describe the parameters of a method or function. It is used to document what each parameter does, its data type, and any constraints or requirements that apply.

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

The @return tag is used to…..

A

The @return tag is used to describe the return value of a method or function. It is used to document what the method returns, its data type, and any constraints or requirements that apply.

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