CIS4570 Advanced Java Programming

Ace your homework & exams now with Quizwiz!

How does the character "A" compare to the character "B"?

"A" is less than "B"

When determining whether a number is inside a range, its best to use this operator.

&&.

For the following code, what would be the value of str[2]? String[] str = {"abc", "def", "ghi", "jkl"};

A reference to the String object containing "ghi"

Whereas a recursive algorithm might result in faster execution time, the programmer might be able to design an iterative algorithm faster.

False.

A conditionally executed statement should be indented one level from the IF clause.

True.

A super class has a member with package access. A class that is outside the super class's package, but inherits from the superclass, can access this member.

True.

Each instance of a class has its own set of instance fields.

True.

Enumerated data types are actually special types of classes.

True.

You can think of this code as being "protected" because the application will not halt If it throws an exception.

try block.

What will be displayed after the following code is executed? String str = "RSTUVWXYZ"; System.out.println(str.charAt(5));

w.

Array bounds checking happens ________.

when the program runs.

Which of the following are NOT valid println statements:

A & C & D.

Which of the following are not valid assignment statements?

B. 72 = amount; C. profit = 129

It is not necessary to have a base case in all recursive algorithms.

False.

The first size declarator in the declaration of a two-dimensional array represents the number of columns. The second size declarator represents the number of rows.

False.

This is when method A calls method B, which calls method A.

Indirect recursion.

This is the technology that makes it possible for a Java application to communicate with a DBMS.

Java DataBase Connectivity(JDBC).

Chapter 2

Java Fundamentals

JVM stands for?

Java Virtual Machine

What will be displayed after the following code is executed? String str1 = "The quick brown fox jumped over the lazy dog."; String str2 = str1.substring(20,26); System.out.println(str2);

Jumped.

These are words that have a special meaning in the programming language.

Key words.

This array field holds the number of elements that the array has.

Length.

This is one of the methods that are common to both the String and StringBuilder classes.

Length.

This is the maximum number of comparisons performed by the sequential search on an array of N elements (assuming the search values are consistently found).

N/2.

This is an if statement that appears inside another if statement.

Nested if statement.

When in the same try statement you are handling multiple exceptions, and some of the exceptions are related to each other through inheritance, you should handle the more general exception classes before the more specialized exception classes.

False.

When passing multiple arguments to a method, the order in which the arguments are passed is not important.

False.

When you write a constructor for a class, it still has the default constructor that Java automatically provides.

False.

You can declare an enumerated data type inside a method.

False.

You can use the = operator to assign a string to a StringBuilder object.

False.

You cannot have more than one catch clause per try statement.

False.

T/F - The = operator and the == operator perform the same operation.

False. ( = != ==)

The do-while loop is this type of loop.

Post test.

The for loop is this type of loop.

Pretest.

The while loop is this type of a loop.

Pretest. Ex: while{ do{

This is a column that holds a unique value for each row and can be used to identify specific rows.

Primary key.

A left brace in a Java program is always followed by a right brace later in the program.

True.

A private class that is defined inside another class is not visible to code outside the outer class.

True.

A superclass has a member with package access. A class that is outside the superclass's package, but inherits from the superclass, can access this member.

True.

A two-dimensional array has multiple length fields.

True.

A variable may be defined in the initialization expression of the for loop.

True.

This is a named storage location in the computer's memory.

Variable

This clause allows you to specify a search criteria with the SELECT statement.

WHERE.

When initializing a two-dimensional array, you enclose each row's initialization list in these.

braces Ex: {}

This is an internal list of all the methods that are currently executing.

call stack

Which type of operator lets you manually convert a value, even if it means that a narrowing conversion will take place?

cast.

This String class method performs the same operation as the + operator when used on strings.

concat.

The character that separates tokens in a string is known as a

delimiter.

This type of loop always executes at least once.

do-while.

Which key word is used to declare a named constant?

final

If a class has this method, it is called automatically just before an instance of the class is deleted by the JVM.

finalize

This method can be used to retrieve the error message from an exception object.

getMessage.

This StringTokenizer method returns true if there are more tokens to be extracted from a string.

hasMoreTokens.

When you write a method that throws a checked exception, you must

have a throws clause in the method header.

An anonymous inner class must _______.

implement an interface extend a superclass.

These are symbols or words that perform operations on one or more operands.

operators.

This enum method returns the position of an enum constant in the declaration.

ordinal.

Abstract methods must be _______.

overridden.

In the expression number++, the ++ operator is in what mode?

postfix.

Each element of an array is accessed by a number known as a( n) __________.

subscript.

This key word refers to an object's superclass.

super

The following is an explicit call to the superclass default constructor.

super();

This is the name if reference variable that is always available to an instance method, and refers to the object that is calling the method.

this.

You use this statement to manually throw an exception.

throw.

When an exception is generated, it is said to have been ________.

thrown.

This method converts a character to uppercase.

toUpperCase ex: ();

The catch clause

1. Follows the try clause. 2. Starts with the word catch followed by a parameter list in parentheses containing an ExceptionType parameter variable. 3. Contains code to gracefully handle the exception type listed in the parameter list.

Which of the following statement is(are) true about this code? final int ARRAY_SIZE = 10; long[] array1 = new long[ARRAY_SIZE];

1. It will allow valid subscriptions in the range of 0 through 9. 2. It creates an instance of an array of ten long values. 3. It declares array1 to be a reference to an array of long values.

But hashing is not always good. For instance, it is bad in the following case:

1. There are multiple records with the same key. 2. Need to retrieve records with keys within a certain range. 3.Need to find the record with minimum or maximum key. 4. Need to visit the records in key order.

Which of the following problems can be solved recursively.

1. Towers of Hanoi 2. Binary Search 3. Greatest Common Denominator.

What will be the value of position after the following code is executed? int position; String str = "The cow jumped over the moon."; position = str.indexOf("ov");

15.

If you do not pass an argument to the StringBuilder constructor, the object will have enough memory to store this many characters.

16.

The conditional operator takes this many operands.

3 (Three)

A method is called once from a program's main method, and then it calls itself four times. The depth of recursion is

4.

What will be displayed after the following code is executed? String str = "abc456"; for(int I = 0; I < str.length(); I++) { char chr = str. CharAt(i); if (!Character.isLetter(cur)) System.out.print(Character.toUppercase(cur)); }

456.

Given the following code that uses recursion to find the factorial of a number, how many times will the else clause to be executed if n = 5? private static int factorial(int n) { if (n == 0) return 1; else return n * factorial(n-1);

5.

When will the println statement in the following program segment display? int x = 5;

5.

What will the println statement in the following program segment displays? int x = 5; System.out.println(++x);

6

Chapter 3

A First Look at Classes and Objects.

Chapter 6

A Second Look at Classes and Objects.

What would be the result of executing the following code? int[] x = {0,1,2,3,4,5};

An Array of 6 values, ranging from 0 through 5 and referenced by the variable x will be created.

Chapter 7

Arrays and the ArrayList Class Part 2.

Chapter 7

Arrays and the ArrayList Class.

This SQL statement is used to delete an entire table.

DROP.

This is a string listing the protocol that should be used to access a database, the name of the database, and potentially other items.

Database Universal Resource Locator.

Chapter 15

Databases.

The if statement is an example of a _______.

Decision Structure.

Chapter 4

Decision Structures.

If you do not want to write a constructor for a class, this is automatically provided for the class.

Default constructor.

If your code does not handle an exception when it is thrown, it is dealt with by this.

Default exception handler.

This section of a switch statement is branched to if none of the case expressions match the switch expressions.

Default.

To delete a specific character in a StringBuilder object, use this method.

DeleteCharAt.

This is when a method explicitly calls itself.

Direct recursion.

With this type of binding, the Java Virtual Machine determines at runtime which method to call, depending on the type of the object that a variable references.

Dynamic.

This is a Boolean variable that signals when some condition exists in the program.

Flag.

This is a column in one table that references a primary key in another table.

Foreign Key.

The JVM periodically performs this process, which automatically removes unreferenced objects from memory.

Garbage collection.

Chapter 10

Handling Exceptions.

This SQL statement is used to insert rows into a table.

INSERT.

FileNotFoundException inherits from__________.

IOException.

This type of loop has no way of ending and repeats until the program is interrupted.

Infinite

This expression is executed by the for loop only once, regardless of the number of iterations.

Initialization Expression.

A class that is defined inside of another class is called a(n)_____.

Inner class or nesting.

Chapter 1

Intro to Computers and Java

When an exception is thrown.

It must be handled by the program or by the default exception handler.

What does <String> specify in the following statement? ArrayList<String> nameList = new ArrayList<String>();

It specifies that only string objects may be stored in the ArrayList object.

What is each repetition of a loop known as?

Iteration

Class used to display dialog boxes.

JOptionPane

Support you have a large number of items that need to be stored and retrieved in a data structure. If you store each item sequentially in an array. i.e. first item goes in array[0], second item in array[1], etc. The time it takes to RETRIEVE each item is on average is?

Linearly proportional to the number of items(i.e twice as many items means it takes twice as long as retrieve each one fo them).

When the value of an item is dependent on other data, and that item is not updated when the other data is changed, what has the value become?

Stale.

This type of method cannot access any non static member variables in its own class.

Static.

Which of the following statement converts a double variable named tax to a string and stores the value in the String object named str?

String str = Double.toString(tax);

Which of the following statements converts an int variable named number to a string and stores the value in the String object variable named str?

String str = Integer.toString(number);

The indexOf and lastIndexOf methods are members of this class.

String.

The startsWith, endsWith, and regionMatches methods are members of this class.

String.

The substring, getChars, and toCharArray methods are members of this class.

String.

In an inheritance relationship, this is the specialized class.

Subclass.

In an inheritance relationship, this is the general class.

Superclass

These are the rules that must be followed when writing a program.

Syntax

You can use this method to display formatted output in a console window.

System.out.printf

Chapter 8

Text Processing and Wrapper Classes.

What happens if a program does not handle an unchecked exception?

The program is halted and the default exception handler handles the exception.

What would be the result after the following code is executed? int[] numbers = {40, 3, 5, 7, 8, 12, 10}; int value = numbers[0]; for (int i = 1; I < numbers.length; i++) { if (numbers[I] < value) value = numbers[I]; }

The value variable will contain the lowest value in the numbers array.

What would be the result after the following code is executed? int[] numbers = {50,10,15,20,25,100,30}; int value = 0; for (int i = 1; I< numbers.length; I++) value += numbers[i];

The value variable will contain the sum of all the values in the numbers array.

Two or more methods in a class may have the same name, as long as this is different.

They're parameter lists.

All exception classes inherit from this class.

Throwable.

A variable must be declared before it can be used.

True.

An ArrayList automatically expands in size to accommodate the items stored in it.

True.

An iterative algorithm will usually run faster than an equivalent recursive algorithm.

True.

Any problem that can be solved recursively can also be solved iteratively, with a loop.

True.

Both of the following declarations are legal and equivalent: int[ ] numbers: int numbers[ ];

True.

By default, all members of an interface are public.

True.

Constant time is better than logarithmic time

True.

If the toUpperCase method's argument is already uppercase, it is returned as is, with no changes.

True.

In a nested loop, the inner loop goes through all of its iterations for every iteration of the outer loop.

True.

In a subclass, a call to the superclass constructor can be written only in the subclass constructor.

True.

Java comes with its own built-in DBMS.

True.

Java does not allow a statement to use a subscript that is outside the range of valid subscripts for an array.

True.

Not including polymorphic references, a try statement can have only one catch clause for each specific type of exception.

True.

Recursion is never absolutely required to solve a problem.

True.

The Java compiler does not display an error message when it processes a statement that uses an invalid subscript.

True.

The occurrence of a string literal in a Java program causes a string to object to be created in memory, initialized with the string literal.

True.

The scope of a variable is limited to the block in which it is defined.

True.

The startsWith and endsWith methods are case sensitive.

True.

The subscript of the last element in a one-dimensional array is one less than the total number of elements in the array.

True.

The superclass constructor always executes before the subclass constructor.

True.

The term rollback refers to undoing changes to a database.

True.

The values in an initialization list are stored in the array in the order they appear in the list.

True.

The while loop is a pretest loop

True.

There are two versions of the regionMatches method: one that is case sensitive, and one that can be case insensitive.

True.

When a class contains an abstract method, the class cannot be instantiated.

True.

When an array is passed to a method, the method has access to the original array.

True.

When an exception is thrown, the JVM searches the try statement's catch clauses from top to bottom, and passes control of the program to the first catch clause with a parameter that is compatible with the exception.

True.

When an if statement is nested in the if clause of another statement, the only time the inner IF statement is executed is when the boolean expression of the outer IF statement is True.

True.

When an object is passed as an argument to a method, the method can access the argument.

True.

When passing an argument to a method, the argument's data type must be compatible with the parameters variable type.

True.

You are not required to catch exceptions that inherit from the RuntimeException class.

True.

You cannot change the value of a variable whose declaration uses the final keyword.

True.

Java applications that uses a DBMS to store data does not need know about the physical structure of the data.

True. "The Java Programmer does not need to know about the physical structure of the data. He or she only needs to know how to write a code that interacts with the DBMS."

The negation operator is ____.

Unary.

In Java there's are two categories of exceptions which are

Unchecked and checked.

These are exceptions that inherit from the Error class or the RuntimeException class.

Unchecked exceptions.

To create a block of statements, you enclose the statements in ______.

braces {}.

The Java compiler generates?

byte code

A(n)_____ is a section of code that gracefully responds to exceptions when they are thrown.

exception handler.

This method is specified in the Statement interface and should be used to execute a SELECT statement.

executeQuery.

This method is specified in the Statement interface and should be used to execute an INSERT statement.

executeUpdate.

This method is specified in the Statement interface and should be used to execute an UPDATE statement.

executeUpdate.

Which key word indicates that a class inherits from another class?

extends.

This is one or more statements that are always executed after the try block has executed, and after any catch blocks have executed if an exception was thrown.

finally block.

In the following code that uses recursion to find the factorial of a number, what is the base case? private static int factorial(int n) { if (n==0) return 1; else return n * factorial(n-1); }

if (n == 0) return 1;

You can use a lambda expression to instantiate an object that _______.

implements a functional interface.

You use the ________________ operator to define an anonymous inner class.

new.

Which Scanner class method would you use to read a double as input?

nextDouble

Which Scanner class method would you use to read a string as input?

nextLine

A functional interface is an interface with ____________.

only one abstract method.

Each of the numeric wrapper classes has a static method that converts a string to a number. All of these methods begin with this word.

parse. Ex: parse.int

This method can be called from any exception object, and it shows the chain of methods that were called when the exception was thrown.

printStackTrace.

Which of the following statements correctly specifies two interfaces?

public class ClassA implements Interface1, Interface2.

Which of the following statements declares Salaried as a subclass of PayType?

public class Salaried extends PayType.

In the ______, we must always reduce the problem to a smaller version of the original problem.

recursive case.

What will be displayed after the following statements are executed? String str = "red$green&blue#orange"; String[] tokens = str.split("[$&#]"); for (String s : tokens) System.out.print(s + " ");

red green blue orange.

To change the value of a specific character in a StringBuilder object, use this method.

setCharAt.

This indicates in an array declaration the number of elements that an array is to have.

size declarator.

This determines whether two different String objects contain the same string.

thestringCompare method

This informs the compiler of the exceptions that could get thrown from a method.

throws clause.

If you write this method for a class, Java will automatically call it any time you concatenate an object of the class with a string.

toString.

When Java converts a lower-ranked value to a higher-ranked type, it is called a

widening conversion.

Chapter 9

Inheritance.

This is a Java class that is designed to communicate with a specific DBMS.

JDBC Driver.

Chapter 14

Recursion.

To insert an item at a specific location in an ArrayList object, you use this method.

add.

Making an instance of one class a field in another class is called______.

aggregation.

A class's responsibilities are_____.

b. things the class knows. c. actions the class performs.

Abstract classes cannot ________.

be instantiated.

An object is a

instance

Which characters mark the beginning of a multiline comment?

/*

Which character mark the beginning of a documentation comment?

/**

The first subscript in an array is always.

0.

The last subscript in an array is always ______.

1 less than the number of elements.

When an object is passed as an argument to a method, this is actually passed.

A reference to the object.

If you were to look at a machine language program, you would see________.

A stream of binary numbers.

This is method that gets a value from class field, but does not change it.

Accessor.

This is a variable that keeps a running total.

Accumulator.

To store an item in an ArrayList object, use this method.

Add

Each byte is assigned a unique what?

Address

In a subclass constructor, a call to the superclass constructor must_____.

Appears as the very first statement.

A byte is made up of eight what?

Bits

The isDigit, isLetter, and isLetterOrDigit methods are members of this class.

Character.

To use recursion for a binary search, what is required before the search can proceed?

The array must be sorted.

An else clause always goes with which of the following?

The closest previous if clause that doesn't already have its own else clause.

What will be the result after the following code is executed? final int ARRAY_SIZE = 5; float[] x = float[ARRAY_SIZE]; for ( i = 1; i <=ARRAY_SIZE; i++) { x[i] = 10.0 }

The code contains a syntax error and will not compile.

Chapter 8

Wrapper classes part 2.

You cannot use the fully qualified name of an enum constant for this.

a case expression

Suppose you have a large number of items that need to be stored and retrieved in a data structure. If you store each item sequentially in an array, i.e. first item goes in array[0], second item in array[1], etc. The time it takes to store each item is ?

a constant (storing each item takes the same amount of time)

HM_07 Suppose you need to store a set of values such that each one corresponds to a key. For example: key value US Washington DC France Paris Spain Madrid ... etc. Then

a hashing technique is a good choice

This search algorithm repeatedly divides the portion of an array being searched in half.

binary search.

Fields in an interface are _____.

both final and static .

enum constants have a toString method.

False. Ex: enum Day{SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY}

This is a member of class that holds data.

Field.

This is the part of a problem that can be solved without recursion.

Base case.

A The process of matching a method call with the correct method is known as _____.

Binding.

A class is analogous to a ______.

Blueprint.

This type of expression has a value of either true or false.

Boolean Expression.

A group of statements, such as the comments on a class or a method, are enclosed in___.

Braces{}

To open a file for writing, you use the following class:

File and Scanner.

This part of the computer fetches instructions, carries out the operations commanded by the instructions, and produces some outcome or resultant information.

CPU

All exceptions that do not inherit from the Error class or the RunTimeException class are _______.

Checked exceptions.

CRC stands for

Class, Responsibilities, Collaborations

A collection of programming statements that specify the attributes and methods a particular type of object can have is ________.

Class.

In the following statement, which is the subclass? public class ClassA extends ClassB implements ClassC

ClassA.

In the following statement, which is the superclass? public class ClassA extends ClassB implements ClassC

ClassB.

In the following statement, which is the interface? public class ClassA extends ClassB implements ClassC

ClassC.

When a program is finished using a file, it should do this.

Close the file.

The data that is stored in a row is divided into ______.

Columns.

Suppose you have a large number of items that need to be stored and retrieved in a data structure. The hashing uses a function that tells you where to store the item(and where to retrieve it), so the time to both store and retrieve each item is.

Constant, where storing each item takes the same amount of time.

This is a method that is automatically called when an instance of a class is created.

Constructor.

A(n) _____ is an object that is generated in memory as the result of an error or an unexpected event.

Exception

This is a section of code that gracefully responds to exceptions.

Exception handler.

This key word indicates that a class inherits from another class.

Extends.

Comments that begin with // can be processed by java doc.

False

When a ResultSet object is initially created, its cursor is pointing at the first row in the result set.

False, It's pointing to a spot just before the first row.

In SQL, the not-equal-to operator is !=, which is the same as in Java.

False, it is <>.

A class can implement only one interface.

False.

A class may not have more than one constructor.

False.

A method cannot return a reference to an object.

False.

A static member method may refer to non-static member variables of the same class at any time.

False.

A subclass reference variable can reference an object of the superclass.

False.

A superclass reference variable can reference an object of a class that inherits from the superclass. T/F

False.

All static member variables are initialized to -1 by default.

False.

An array's size declarator can be a negative integer expression.

False.

An object of a superclass can access members declared in a subclass.

False.

Character testing methods, such as isLetter, accept strings as arguments and test each character in the String.

False.

Constructors are not inherited.

False.

IOException serves as a superclass for exceptions that are related to programming errors, such as an out-of-bounds array subscript.

False.

If a subclass constructor does not explicitly call a superclass constructor, Java will not call any of the superclass's constructors.

False.

If one of an operator's operands is a double and the other operand is an int, Java will automatically convert the value of the double to an int.

False.

If the toLowerCase method's argument is already lower case, it will be inadvertently converted to uppercase.

False.

In a transaction, it is permissible for only some of the database updates to be made.

False.

In the base case, a recursive method calls itself with a smaller version of the original problem.

False.

It is not necessary to initialize accumulator variables.

False.

One limitation of the for loop is that only one variable may be initialized in the initialization expression.

False.

Some problems can be solved only through recursion.

False.

The For Loop is a posttest loop

False.

The String class's replacement method can replace individual characters, but not substrings.

False.

The StringBuilder class's replace method can replace individual characters, but not substrings.

False.

The do-while loop is a pretest loop.

False.

The indexOf and lastIndexOf methods find characters, but cannot find substrings.

False.

The throws clause causes an exception to be thrown.

False.

To calculate the total number of iterations of a nested loop, add the number of iterations of all the loops.

False.

To find the classes needed for an object-oriented application, you identify all of the verbs in a description of the problem domain.

False.

To get the value of wrapper class object, you must call a method.

False.

Variable names may begin with a number.

False.

When a method is declared with the final modifier, it must be overridden in a subclass.

False.

When an exception is thrown by code inside a try block, all of the statements in the try block are always executed.

False.

Suppose you have a large number of items that need to be stored and retrieved in a data structure. If you store them SORTED in an array. The time it takes to RETRIEVE each item is on average.

Linearly proportional to the number of items(i.e. twice as many items means it takes twice as long to retrieve each one of them), proportional to the logarithm of the total number of items.

The following data: -72 -'A' -"Hello World" -2.8712 are all examples of ____.

Literals

&&, ||, and ! are _______.

Logical operators.

This is a variable that controls the number of iterations performed by a loop.

Loop control variable.

Chapter 5

Loops and Files

These static final variables are members of the numeric wrapper classes and hold the minimum and maximum values for a particular data type.

MIN_VALUE && MAX_VALUE

This is a method that stores a value in a field or in some other way changes the value of a field.

Mutator.

The keyword causes an object to be created in memory.

New (Ex: scanner = New Scanner)

This is an empty statement that does nothing.

Null statement.

The numeric wrapper classes' "parse" method all throw an exception of this type.

NumberFormatException.

All classes directly or indirectly inherit from this class.

Object.

When a class does not use the extends key word to inherit from another class, Java automatically extends it from the ______class.

Object.

These are symbols or words that perform operations on one or more operands.

Operators

This refers to the actions taken internally by the Java Virtual Machine when a method is called.

Overhead.

A method in a subclass having the same name as a method in the superclass but a different signature is an example of_________.

Overloading.

A method in a subclass having the same signature as a method in the superclass is an example of an ______.

Overriding.

This class allows you to use the print and println methods to write data to a file.

PrintWriter

To open a file for writing, you use the following classes:

PrintWriter.(The print method is used to write an item of data to a file without writing the new line character.)

These are words or names that are used to identify storage locations in memory and parts of the program that are created by the programmer.

Programmer-defined names.

These superclass members are accessible to subclasses and classes in the same package.

Protected.

When a class implements an interface, it must do which of the following?

Provide all of the non default methods that are listed in the interface, with the exact signatures return types specified.

These are words or names that are used to identify storage locations in memory and parts of the program that are created by the programmer.

Punctuation

This SQL statement is used to remove rows from a table.

REMOVE.

This is the part of a problem that is solved with recursion.

Recursion case.

>,<, and == are _______.

Relational operators.

To delete an item from an ArrayList object, use this method.

Remove.

This contains the results of an SQL SELECT statement .

Result set.

This keyword causes a value to be sent back from a method to the statement that called it.

Return.

The data that is stored in a table is organized in _________.

Rows.

This type of SQL statement is used to retrieve rows from a table.

SELECT.

This is a standard language for working with database management systems.

SQL.

This class allows you to read a line from a file.

Scanner

Assuming he following declaration exists: enum Seasons {SPRING, WINTER, SUMMER,FALL} What is the fully qualified name of the FALL constant?

Seasons.FALL.

This type type of memory can hold data for long periods of time- even when there is no power to the computer.

Secondary Storage

Every complete statement ends with a ____.

Semicolon

This is a special value that signals when there are no more items from a list of items to be processed. This value cannot be mistaken as an item from the list.

Sentinel. (Requires the user to know in advance the number of days for which he or she has sales amounts. Sometimes the user has a list if input values that is very long and doesn't know the number of items there are.

This search algorithm steps through an array, comparing each item with the search value.

Sequential search.

This is the process of converting an object to a series of bytes that represent the object's data.

Serialization.

When a local variable has the same name as a field, the local variable's name does what to the field's name?

Shadows.

To determine the number of items stored in an ArrayList object, use this method.

Size.

Like a loop, a recursive method must have which of the following?

Some way to control the number of times it repeats.


Related study sets

Bio Unit 5 Module 4 Concept Resources

View Set

Supplemental Nutrition Assistance Program (SNAP)

View Set

1.1.1. Explain the importance of water as a solvent in transport, including its dipole nature.

View Set

AP Gov. Unit 4-College Board and Khan Academy

View Set

vocab workshop level h unit 2 synonyms and antonyms

View Set