when you know how many times a task is to be repeated.
Back
what is an if/else if statement?
Front
An if statement that is followed by an optional else if statement, which will possibly execute when the first boolean expression is false.
Back
Can interface extend multiple times?
Front
yes
Back
What is the keyword that would be used to extend an interface?
Front
extends
Back
What is a interface?
Front
is a collection of abstract methods
Back
What is an if statement?
Front
A conditional statement that uses if logic. If true or if false, do x, else do something else or nothing.
Back
Name the three parts of an for loop?
Front
initialization, Boolean expression, and the body
Back
What is a switch statement?
Front
is a statement that allows a variable to be tested for equality against a list of values.
Back
What is the while loop?
Front
a statement in Java that repeatedly executes a target statement as long as a given condition is true.
Back
What are the three categories of exceptions?
Front
Checked exceptions, unchecked exceptions, and errors.
Back
What is the keyword that is used to declare an interface?
Front
interface
Back
What does the expression variable do?
Front
it evaluates to the array you need to loop through and can be an array variable or a method call.
Back
What are the three types of loop constructs?
Front
While loop, for loop, do..while loop
Back
what keyword would you use for catching exceptions?
Front
try and catch
Back
What is the static keyword used mainly for ?
Front
for memory management
Back
What is an exception?
Front
an object that wraps an error event that occurred within a method and contains info about the error and the state of the program when the error happened.
Back
Describe Unchecked Exceptions?
Front
are exceptions in which the compiler does not enforce that you handle them explicitly. such as you not throwing them.
Back
What is an nested IF Statement?
Front
putting a if or else statement inside another if or else statement
Back
What are the 3 important rules to remember about Interfaces?
Front
A class can implement more than one interface at a time.
A class can extend only one class but implement many interfaces.
An interface can extend another interface similar to how a class can extend another class.
Back
What is a string?
Front
A sequence of characters
Back
What are some similarities between an interface and a class?
Front
both can contain any number of methods.
can be written in a file with a .java extension.
the byte code of an interface appears in a .class file.
Back
How does one access a package from other packages?
Front
by importing package.*;
import package.classname;
fully qualified name.
Back
Describe the usage of the "this" keyword?
Front
is a reference variable that refers to the current object.
Back
Does a finally block of code always execute?
Front
yes
Back
What are exceptions?
Front
they are events that occur during the execution of programs that disrupt the normal flow of instructions.
Back
What is the declaration variable?
Front
a newly declared block variable that is of a type compatible with the elements of the array you are accessing.
Back
What are some difference between an interface and a class?
Front
an interface cannot be instantiate.
it does not contain any constructors.
all the methods in an interface are abstract.
they cannot contain instance fields.
cannot be extended by a class only implemented.
an interface can extend multiple interfaces.
Back
What is a package?
Front
a group of similar type of classes interfaces and sub-packages.
Back
Describe Errors ?
Front
are not exceptions but are problems that arise beyond the control of the user or programmer
Back
What are the forms that a static can be ?
Front
it can be a variable, a method, a block, and a nested class.
Back
What is the for loop?
Front
a repetition control structure that allows you to efficiently write a loop that needs to be executed a specific number of times.
Back
What are the three advantages of Packages?
Front
They are used to categorize classes and interfaces so they can be easily maintained.
They provide access protection.
They remove naming collision.
Back
Give an example of an exception?
Front
dividing by zero.
Back
Describe what the final keyword is used for?
Front
it used to restrict the user.
Back
List two types of unchecked exceptions?
Front
Errors and Run-time Exceptions
Back
When would you use a the throw/throws keyword ?
Front
when a method does not handle a checked exception.
Back
What does the String Class do ?
Front
it creates and manipulates strings.
Back
How many usages are there for the "this" keyword?
Front
six
Back
When is a finally block initiated ?
Front
after a try or a catch block.
Back
What is an if/else statement?
Front
a if statement that is followed by an optional else statement, which will execute when the Boolean expression is false.
Back
What is an accessor method?
Front
a method that is used to obtain information about an object.
Back
what is the advantage of using a static variable ?
Front
it makes your program memory efficient
Back
What does the child interface inherit from the parent interface?
Front
the methods of the parent interface
Back
Describe the difference between a do..while loop and a while loop?
Front
a do..while loop is guaranteed to execute at least one time.
Back
Describe the initialization step?
Front
this step allows you to declare and initialize any loop control variables and ends with a semi colon(;)
Back
What are the forms that the final keyword can be in ?
Front
it can be a variable, method, or class
Back
Describe Checked Exceptions?
Front
are exceptions that the compiler enforces that you handle them explicitly.
such as declaring that checked exceptions must throw them.
Back
What is another name for a final variable that has no value?
Front
blank final variable.
Back
What is the static variable can be used for?
Front
it can be used to refer to the common property of all objects.
Back
what is an example of how a static variable can be used ?
Front
college name of students.
Back
Section 2
(20 cards)
What does the set interface do?
Front
it is a collection that cannot contain duplicate elements.
Back
What is an arraylist?
Front
a part of collection framework that provides dynamic arrays.
Back
What is the collection Interface?
Front
is described as the foundation upon which the collections framework is built and can be seen as a unified architecture for representing and manipulating collections.
Back
What is an disadvantage of using arrays?
Front
Size limit
Back
What is an java array?
Front
it is an object that contains elements of a similar data type. it is a data structure where similar elements are stored.
Back
What is random access?
Front
when user can get any data located at an index position.
Back
During the list interface what can happen ?
Front
elements can be inserted or accessed by their position in the list.
a list may contain duplicate elements.
Back
What are the two types of Arrays?
Front
Single and Multidimensional Array
Back
What does the list interface do ?
Front
it declares the behavior of a collection that stores a sequence of elements.
Back
Describe Code Optimization?
Front
is when the code can be retrieve or when the data can be sorted efficiently.
Back
What are Implementations?
Front
they are reusable data structures.
Back
What does a finally block allow you to do?
Front
it allows you to run any cleanup-type statements that you want to execute, no matter what happens in the protected code.
Back
what are algorithms
Front
they are methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces.
Back
Where would a finally block appear?
Front
at the end of the catch block.
Back
Define size limit?
Front
this means that we can store only the fixed size elements in the array and won't grow it's size at run-time.
Back
What does the collection interface do?
Front
it declares the core methods that all collections have.
Back
What do arraylist inherit?
Front
they inherit abstractlist class and implements list interface.
Back
Where is the first element of an array stored ?
Front
at the zero 0 index.
Back
What does the map interface do ?
Front
it maps unique keys to values.
Back
What are some advantages of arrays?
Front
Some advantages are code Optimization and Random access.