CSCI 111 Test 3
Terms in this set (14)
Methods can be used to break a complex problem into small manageable pieces.
A void method executes a group of statements and then terminates.
A value returning method returns a value to the statement that called it.
This type of method does not return a value.
The index of an array always begins with ?
The last index of an array = ?
arrayRefVar.length - 1
What is an out-of bounds error ?
An attempt to reference elements beyond the bounds of an array.
Is the first element in an array = 1
No. If first element is considered as 1, then an "Off
by one" error will occur.
What are the conditions for a sequential search?
End of array is reached, element looking for is found.
Method header consists of:
Method modifier, return type,
method name, parenthesis
Code can be reused because of this
methods/divide and conquer
This consists of a method name, the return type and method modifiers
This type of method returns the result from where the program branched
return type methods
This type of method displays the result