Unit 2 Vocabulary

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

37 Terms

1
New cards
defines a new data type (a classification). It is the formal implementation, or blueprint, of the attributes and behav­iors of the objects of that class.
class
2
New cards
a specific instance of a class with defined attributes.
object
3
New cards
data the object knows about itself
attributes
4
New cards
variables in a class that define the attributes for objects
instance variables
5
New cards
these define the behaviors or functions for objects to de­scribe what objects can do
methods
6
New cards
creates a new object and initializes its attributes (they have the same name as the class).
constructor
7
New cards
used to create a new object; every object is created using this keyword followed by a call to one of the class's constructors that initializes the object's attrib­utes
new
8
New cards
the constructor name followed by the parameter list
**constructor signature or header**
9
New cards
**the method name followed by the parameter list**
method signature or header
10
New cards
classes that create objects from primitive types, for exam­ple the Integer class and Double class
**wrapper classes**
11
New cards
used to indicate that an object reference doesn't refer to any object yet
null
12
New cards
**Returns the absolute value of an int value** 

\
**(which means no negatives).**
\
**Math method: int abs(int)**
13
New cards
Returns the value of the first parameter raised to the power of the second parameter.
**Math method: double pow(double, double)**
14
New cards
**Returns the positive square root of a double value.**
**method: double sqrt(double)**
15
New cards
**Returns a random double value greater than or equal to 0.0 and less than 1.0 (not including 1.0)!**
**Math.random()**
16
New cards
a list of the types and variable names for the arguments being passed to a method or constructor
\
**parameter list**
17
New cards
\
**creating multiple methods or constructors with the same name but different number or types of parameters.**
overloading
18
New cards
\
**When you call a method or constructor and give it an argument, a copy of the argument's value is saved in the parameter variable.** 
\
**call by value**
19
New cards
\
**This is the error if you try to call an object method on an object variable whose value is null**
NullPointerException
20
New cards
**These methods must be called using an object name method name.**
**non-static or object method**
21
New cards
**These methods belong to a class and can be called by using the class name instead of creating an object.**
**static method**
22
New cards
**The value returned from a method to the calling method**
return value
23
New cards
objects of the String class that hold sequences of charac­ters.
strings
24
New cards
a number associated with a position in a string (or array)
index
25
New cards
String methods do not change the String object. Any method that seems to change a string actually creates a new string.
immutable
26
New cards
part of a string (the method will create a new string that contains a copy of part of the original string).
substring
27
New cards
returns the number of characters in a String object.
String method: int length()
28
New cards
returns the substring beginning at index from and ending at index (to - 1).
String substring(int from, int to)
29
New cards
returns substring(from, length()).
String substring(int from)
30
New cards
returns the index of the first occurrence of str; returns -1 if not found.
int index­Of(String str)
31
New cards
returns true if this (the calling object) is equal to other; returns false otherwise
boolean equals(String other)
32
New cards
returns a value < 0 if this is less than other; returns zero if this is equal to other; returns a value > 0 if this is greater than other.
int compareTo(String other)
33
New cards
returns a single character at position index
**substring(index, index+ 1)**
34
New cards
the automatic conversion of primitive types to their cor­responding object wrapper classes, for example int to Integer.
autoboxing
35
New cards
the automatic conversion of wrapper class to the primitive type, for example Integer to int.
unboxing
36
New cards
 moves the random number into a range starting from a minimum number where the range is the (max number - min number + 1)
(int)(Math.random()\*range) + minimum
37
New cards
**Returns the absolute value of a double value.**
**Math method: double abs(double)**