Home
Explore
Exams
Login
Get started
Home
Engineering
Computer Science
AP Java Unit 2: Class Structure and Design
0.0
(0)
Rate it
Studied by 0 people
Call Kai
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Knowt Play
Card Sorting
1/42
Earn XP
Description and Tags
Computer Science
All Modes
Learn
Practice Test
Matching
Spaced Repetition
Call with Kai
Chats
Last updated 7:31 PM on 10/17/22
Update
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat
No analytics yet
Send a link to your students to track their progress
43 Terms
View all (43)
Star these 43
1
New cards
assignment
using assignment operator = to initialize or change value stored in a variable
2
New cards
data type
format of data that can be stored in a variable (int, double, etc.)
3
New cards
declaration
giving a name and data type to a variable
4
New cards
intialization
giving a starting value to a variable using assignment operator =
5
New cards
literal
source code representation of a value, like number or text
6
New cards
primitive type
basic data type that Java predefines
7
New cards
reference type
data type that contains a pointer to the memory location of an object
8
New cards
variable
container that stores a value in memory
9
New cards
ArithmeticException
error caused by dividing by zero
10
New cards
compound assignment operator
shortcut syntax to perform an operation and store the result (+=, /=, etc.)
11
New cards
compound expression
combination of expressions
12
New cards
expression
combination of data and operators that evaluate to single value
13
New cards
operand
data that is operated on
14
New cards
truncate
to cut off data from end
15
New cards
access modifier
keyword used to set visibility of classes, variables, constructors, and methods
16
New cards
encapsulation
object-oriented programming concept where the instance variables of a class are hidden from other classes
17
New cards
instance variable
variable defined in a class that represents an attribute of an object
18
New cards
actual parameter
value given to an attribute when initializing an object
19
New cards
call by value
copying the value of the actual parameter to the constructor's formal parameter
20
New cards
default value
predefined value used by a program when the user doesn't provide a value
21
New cards
formal parameter
values to be passed to a constructor or method
22
New cards
local variable
variable declared and accessible within a specific block of code
23
New cards
no-argument constructor
constructor with no parameters
24
New cards
overloading
defining two or more constructors/ methods with the same name but different signatures
25
New cards
parameterized constructor
constructor with a specific number of arguments to be passed to assign values to an object's instance variables
26
New cards
NullPointerException
error when a reference doesn't point to an object
27
New cards
null
indicated that the variable doesn't refer to any object
28
New cards
application program interface (API)
library of prewritten classes
29
New cards
library
collection of methods or reusable components of code
30
New cards
DRY principle
stands for "Don't Repeat Yourself" and aims to reduce repetition in code
31
New cards
refactor
improve readability, reusability, or structure of program code without altering functionality
32
New cards
return keyword
exits method and provides the value to where the method is called
33
New cards
accessor method
gives value stored in an instance variable
34
New cards
return by value
copy of value given to where method is called
35
New cards
return type
type of value to be given from method
36
New cards
Boolean expression
logical statement that gives true or false value
37
New cards
Sentinel Value
special value used to notify program to stop accepting input
38
New cards
mutator method
changes value stored in instance variable
39
New cards
relational operator
operator used to compare values or expressions
40
New cards
escape sequence
starts with a \ to indicate how to display a String
41
New cards
override
define a method in a subclass with the same method signature as a method inherited from a superclass
42
New cards
this keyword
used to refer to the current object in a method or constructor
43
New cards
scope
where a variable can be used