AP Comp Sci
1 / 60
Term:
Definition:
Show example sentence
Show hint
Keyboard Shortcuts
  • Previous
  • Next
  • F Flip card

Complete list of Terms and Definitions for AP Comp Sci

Terms Definitions
Map ap.java.util boolean containsKey Object get Set keySet Object put Object remove int size interface
Integer ap.java.lang Integer int intValue int compareTo boolean equals class
List ap.java.util void add Object get Object set int size interface
Math ap.java.lang static int abs static double abs static double pow static double sqrt class
Compile A Java program is written in sourcecode and then compiled into bytecode. This bytecode is then interpreted by the Java Virtual Machine.
HashSet / TreeSet ap.java.util boolean add boolean contains boolean remove int size class
compartTo this method compares strings in dictionary order.
Polymorphism principle that behavior can vary depending on the actual ype of an object.
Abstraction the process of finding the essential feature set for a class.
What is the fundamental building block of Java programs. Classes
Double A double is a numeric variable type that is similar to a float. Doubles are all real numbers, meaning that they can be used with decimals..
Variable A variable is a piece of data associated with a class or an object. A variable is the interface between the user and the data in the computer, a way for the user to call on that data.
Inheritance Inheritance in Java refers to when a class �extends� another class. The class that is defined as extending another class is the subclass. The subclass can use any variables or functions defined in the original class (called the super class) as its own as long as they are not defined as �private�.
Give 2 examples of primary storage. SDRAM and DDRAM
int An int is a numeric variable type. It is the basic, generic variable for integer values.
Boolean A boolean is a variable type that can only have one of two possible values - TRUE or FALSE. Booleans are commonly used in conditionals and loops.
What denotes the implicit parameter. this acting as a parameter.
T/F Not all object variables must be initialized before you access them. HAHA, false.
What r overloaded methods. Methods with the same name but different parameter types.
How do u use a class from another package? Import them.
Why do programmers develop computer programs. To perform new tasks! HAHAHA.
What are boundary tests? tests that test with the boundary inputs that r still valid by last to be valid.
How do u read from a console? Wrap System.in inside a BufferReader
What is an oracle? A slow but reliable method to compute s result for testing purpose.
What does a java interpreter do? runs a program, loading necessary bytecode from class files and library files.
What is High-level language's purpose. To make it easier to generate machine code. Java is an example. Another reason is that it helps you describe tasks at a higher conceptual level than machine code.
what does the instanceOf operator do? It tests whether an object belongs to a particular type.
What is a syntax error? The violation of a set of rules a programming language has.
What is early binding and what is late binding. Early binding: when the compiler makes the selection of which class' method should be used when there is more than one candidate with the same method.Late binding: when the program does the selection while its running.
Object ap.java.lang boolean equals int hashCode String toString class
What are java packages? Grouped classes.
Private Private sections of code (or variables) may only be accessed by other portions of code in the same class.
T/F parameter variables and local variables stay when methods exits. False
Assignment An assignment statement is used to give a value to a variable. It looks like this: "x = 5;" - MAKE SURE TO USE ONE EQUAL SIGN!
What's an inner class classes declared inside another.
Comment Comments are used to make notes on your program without affecting the code. By simply writing two slashes // before any text that text will not be compiled. This is a good way to take notes, explain complicated code, or to write for each function what each parameter should mean and what is returned to ensure the user knows what is going on.
String A string is a variable type that stores text data. Strings are assigned values by either using an assignment statement to another String type variable or by putting quotation marks around the text that you want them to equal. EXAMPLE:    String name = �Andrew�;
Loops Loops are segments of code that are repeated either for a designated number of times or until a certain test statement is true.
Who does Yu work for? God, his angelic superior.
What do u manipulate in ur program when u invoke a method. Objects.
final once a value has been set and described with this constant, then the value cannot be changed.
Where does CPU read its machine instructions from? haha, mermory.
T/F you don't have to initialize a instance field. true
Void When you see the word void, it means that the function it is associated with does not return a value. Any void function has no value and can not be used like a variable like functions that return a value can.
If Statement An if statement is a conditional which states that if some test statement is true, the code in the brackets below the if statement should be executed.
What is White-box testing? uses information about the structure of a program to test.
What is the form of calling a method of another class. OBJECT.METHOD(PARAMETERS)
Where does an object store its state? (The data needed to excute its statements) instance fields.
Function A function is a piece of code that is self-contained in a program. Each function should perform a specific task, and can be called from other functions. A function is �called� by using a statement that calls the name of a function followed by whatever necessary parameters in parentheses after the name. Functions are the basic way of organizing a program into smaller steps. Every function is declared by saying whether it is public or private, whether it is void or returns a value, its name, and any parameters.
What operator do u ues in order to construct a new object of a class. new operator.
What is a String. A sequence of characters enclosed in quotation marks.
How do you acquire a shadowed variable from a local field? Use this.shadowed variable.
T/F each object of a class has its own set of instance fields. true
What should be used to compare strings. equals method. Not ==.
What is black-box testing? A testing method that does not take the structure of the implementation into account.
What are the format of Machine Instructions. Binary numbers. 0 or 1
What does every java application contain? a class with a main method.
what do public interfaces do? Specifies what you can do with the interface's objects. But the implementation is hidden altho they r carried out.
What is Test coverage? Measure of how many parts of a program have been tested.
What is a logic error. First of all, logic error is NOT A SYNTAX ERROR. Logic errors are actions that the program perform but the programmer did not attend.