1/32
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Abs(int a)
used to find and return absolute values of an int
Assignment Operator
to assign a value to a variable (“=”)
Class
user-defined data types in object oriented programming
serves as a blueprints for creating objects by defining their attributes/instance variables
Constructor
a special method/procedure within a class that is used to create an instance of a class, always has same name of the class
to create an object/instance of a class by initializing the instance variables
ex. Object obj = new Object();
Encapsulation
the bundling of data and methods within a class, where the data is hidden from external access
ensures that an objects internal state remains consistent by controlling how it can be accessed or modified
IllegalArgumentException
an exception that occurs when a method receives an argument that is inappropriate or invalid for its intended purpose
indicates that there was an error in how arguments were passed into a method
IndexOf(String str)
used to find the index position of the first occurrence of a specified substring within a larger string
Inheritance
a concept in object-oriented programming where a class inherits the properties and behaviors of another class
allows for code reuse and promotes the creation of hierarchical relationships between classes
Return type (void)
return type in programming refers to the data type of the value that a method or function returns
in the case of “void,” it means that the method does not return any value
Length()
used to find the number of characters in a string
Math class
provides various mathematical operations and functions that can be performed on numeric data types
(includes methods for basic arithmetic operations, trigonometry, logarithms, random numbers generation, etc)
Methods
set of instructions for all object of a class
can manipulate data, interact with other objects, or return values
ex: simplify();
Null
a special value in programming that represents the absence of a value
means the object is referring to nothing
Object-oriented programming (OOP)
a programming paradigm that organizes code into objects, which are instances of classes
emphasizes the use of objects to represent real-world entities and their interactions
Objects
instance of a class that represent real-world entities or concepts
describes behavior/methods into a single entity
Overloading constructors
refers to the ability to have multiple constructors in a class, each with a different set of parameters (allows objects to be created with different initial states or configurations)
Parameters
variables declared in a method or function that receive values when the method is called, allow data to be passed into a method and enabled it to perform actions or calculations based on those values
Polymorphism
the ability of objects to take on multiple forms or have multiple types
allows different objects to be treated as instances of a common superclass, enabling flexibility and extensibility
Pow(double a, double b)
used to raise a number (a) to the power of another number (b)
Primitive data types
basic data types that are built into a programming language and represent simple values (include: double, int, boolean)
Random()
generates and returns a pseudorandom decimal value between 0.0-0.99
Reference types
data types in programming that store references or memory addresses rather than the actual value themselves (include objects, arrays, and strings)
Sqrt(double a)
calculates and returns the square root of a given number (a)
Substring(int beginIndex, int endIndex)
used to extract a portion of a string based on the specified beginning and ending indexes
returns a new string that contains the characters from the original string within the given range
Substring(in beginIndex)
used to extract part of an existing string starting from the specified beginning index up to the end of the original string
method call
calls/invokes the method code
String
object that holds sequences of characters (“a”, “b”, “$”)
String literal
set of characters enclosed in double quotes
ex: :”Kelly”
Reference variable
when an object points to a space in memory
Concatenation
operation of joining 2 strings together
ex: “Hello“ + “World” = “HelloWorld
\”
to add quotation marks in string
\\
to add backslash in string
\n
to add new line inside string