Computer Science

studied byStudied by 4 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 61

62 Terms

1

(int)(x + 0.5)

Rounds the value of a double to the nearest whole number.
New cards
2

Abstract Class

A class, usually at the top of a Class Hierarchy, that cannot be instantiated, because not all of its methods are defined.
New cards
3

Abstract Method

A method, written in an Abstract Class, that is not defined. The word `abstract` must come right before the method's return type. It is up to the subclass to fill in the definition for the abstract method.
New cards
4

Accessor Method

A method that enables user to obtain information about an object’s instance and static variables. Also referred to as getter methods.
New cards
5

Assigning to a variable

To update the variable's value.
New cards
6

Attributes of an object

An object’s characteristics (Instance Variables).
New cards
7

Behaviors (Class Methods)

The behavior of an object is what the object is able to do. It is the actions that can be performed by the object.
New cards
8
Boolean
A Java primitive type that can either be true or false
New cards
9

Break

Breaks out of a while loop and executes statements that immediately follow while loop.
New cards
10

Calling a Method

objectName.method() - Calling a method actually gives the command, so the computer will run the code for that method.
New cards
11

Casting

Turning something of one type into another type.
New cards
12

Char

A Java type that represents a single character (a single letter)
New cards
13
Class
A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.
New cards
14
Class Hierarchy
Class Hierarchy refers to the arrangement of classes and how they relate to each other.
New cards
15
Client
When someone else creates a Class (like `String`, or `Randomizer`), and you are using the functionality of that Class in your program, your program is a *client* of the class. You are using the class as a client.
New cards
16

Compile Time Error

An error in the actual Java code. The code will not **compile** into an executable program, because there are errors in the text of the code.
New cards
17

Concatenation

The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.
New cards
18

Constructor

A constructor is a special method of a Class that constructs a new object (a new instance) of the Class and sets the initial values for the instance variables.
New cards
19

Declare a variable

Declaring a variable is defining it for the first time.
New cards
20
Defining a Method
To teach the computer a new command and explain what it should do when receiving that command.
New cards
21
Double
A Java type that represents a real number with decimal values
New cards
22

Encapsulation

The process of hiding the implementation details of a class from the user
New cards
23
Exception
An exception is thrown by Java when a **runtime error** is encountered. The exception provides information about what kind of error occurred.
New cards
24
For Loop
A for loop lets us repeat code a **fixed number of times.**
New cards
25
Getter Method
An instance method that allows the client to **get** the value of an instance variable on an object.
New cards
26

If Statement

Executes code only if condition is true
New cards
27
Immutable
Unable to be changed or manipulated. String are immutable.
New cards
28
Inheritance
When a subclass extends a superclass, the subclass inherits all of the static methods, static variables, and public instance methods of the superclass. This is called inheritance.
New cards
29
Initializing a Variable
Initializing a variable is giving it an initial value.
New cards
30
Instance
A created object with defined attributes.
New cards
31
Instance method
An instance method is a method that defines the behavior of an object. It defines an action that the object can perform.
New cards
32
Instance Variable
A variable defined in a Class, for which each object of the class has its own copy.
New cards
33
Local Variable
A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to.
New cards
34
Loop and a half
A loop, most often set with while(true), that has a break in the loop body.
New cards
35
Method
Procedures that allow us to control and define the behavior of an object.
New cards
36
Method Overloading
Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program.
New cards
37
Method Overriding
If a subclass defines a new method body for a method defined in the superclass, then the subclass has **overridden** the method of the superclass.
New cards
38

Mutator Method

A method that enables user to change the value of an object’s instance and static variables.
New cards
39

New

Necessary keyword for instantiating a new class object.
New cards
40
Object
An object is a variable of a data type that is user defined. Every object has a state and a behavior.
New cards
41
Object Oriented Programming
Programming model that focuses on **objects** and the data and actions associated with the objects.
New cards
42
Parameter
A variable passed into a method from outside the method.
New cards
43
Polymorphism
An object can take on different forms depending on its implementation. Java can call the correct method even when an object is disguised as a more generic reference type
New cards
44

Primitive Type

Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)
New cards
45
Public
Allows access to data and methods from classes outside the declaring class.
New cards
46
Return
Keyword used in methods to return a value back to the initial program that called the method.
New cards
47
Return Type
Indicates what type value is being returned from the method
New cards
48
Return Value
The value that is returned from a method.
New cards
49
Scope
In what part of the program the variable exits
New cards
50
Sentinal
A constant that has the specific purpose of being the value that breaks out of a loop.
New cards
51
Setter Method
An instance method that allows the client to **set** the value of an instance variable on an object.
New cards
52
Shadowing
If two variables within the same scope have the same name, the variable with the more specific scope will be called.
New cards
53
State
The data that is associated with an object or class.
New cards
54
Static Method
A method called on the Class, rather than on a specific object of the Class.
New cards
55
Static Variable
A variable or attribute of a class that is shared between **all** instance of a class. Each instance **does not** get their own copy.
New cards
56
String
A sequence of characters
New cards
57
Subclass
A child class that inherits attributes and behaviors from a superclass (parent).
New cards
58
Super
The super keyword lets us reference the superclass when writing code inside of a subclass.
New cards
59
Superclass
A parent class that contains common attributes and behaviors used by subclasses (children).
New cards
60
this
Refers to the current object
New cards
61
toString
toString is a special method you write in your class that returns a String representation of the object.
New cards
62
Variable
A symbol or container that holds a value.
New cards

Explore top notes

note Note
studied byStudied by 13 people
771 days ago
5.0(1)
note Note
studied byStudied by 73 people
403 days ago
5.0(2)
note Note
studied byStudied by 517 people
112 days ago
5.0(7)
note Note
studied byStudied by 3 people
733 days ago
4.0(1)
note Note
studied byStudied by 7 people
743 days ago
5.0(1)
note Note
studied byStudied by 196 people
30 days ago
5.0(2)
note Note
studied byStudied by 8 people
523 days ago
5.0(1)
note Note
studied byStudied by 7 people
866 days ago
5.0(1)

Explore top flashcards

flashcards Flashcard (25)
studied byStudied by 119 people
649 days ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 2 people
617 days ago
5.0(1)
flashcards Flashcard (26)
studied byStudied by 20 people
511 days ago
5.0(1)
flashcards Flashcard (92)
studied byStudied by 16 people
782 days ago
5.0(1)
flashcards Flashcard (40)
studied byStudied by 18 people
614 days ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 3 people
472 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 129 people
537 days ago
5.0(1)
flashcards Flashcard (76)
studied byStudied by 418 people
671 days ago
5.0(5)
robot