String is a Java type that represents a string of characters (text)
A sequence of characters enclosed in double quotations “ “.
Includes the class and main method arguments. Must include both in order to run successfully.
Main method. Code to be run must be placed within the main method.
Class. The name of MyProgram must match the name of the file.
Displays output on the computer monitor.
Displays output on the computer monitor and moves cursor to next line.
`int` is a Java type that represents an integer (a whole number)
`char` is a Java type that represents a single character (a single letter)
`double` is a Java type that represents a real number with decimal values
Declaring a variable is defining it for the first time.
Initializing a variable is giving it an initial value, or a starting value.
Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)
A boolean is a true or false value.
Reference variables store the address of the value
Prevents variables from changing value.
The modulus operator (written as % in most programming languages) divides two numbers and returns the remainder.
When two integers are divided, the decimal values are truncated, or chopped off.
The order in which mathematical expressions should be evaluated. Starts with Parentheses, Exponents, Multiplications and Division, Addition and Subtraction.
The fixed value being assigned to a variable. Often primitive data types.
Exception that is thrown to warn programmers about arithmetic errors in their code.
Increase the value of a variable by one. variable++;
Decrease the value of a variable by one. variable--;
Allows programmers to shortcut variable assignments that include the variable being assigned a new value: x = x + y; shortcut: x += y;
Turning something of one type into another type!
When Java automatically casts the value correctly without the programmer needing to do so
Rounds the value of a double to the nearest whole number.
The highest value Java is able to access. 2147483647
When a calculation relies on a number outside the acceptable number range, Java will wrap back to the MIN or MAX value depending on the value.
Allows users to input String values.
Allows users to input int values.
Allows users to input double values.
Packages are used to group code into a folder for easy use.
A class within java.util. It contains code specifically designed to help with user input.
Classes are the template through which objects are created. It is the formal blueprint for creating objects.
An object is a variable of a data type that is user defined. Every object has a state and a behavior.
A created object with defined attributes.
The data that is associated with an object or class.
The actions that can be completed by an object or class.
The use of object and class types in programming.
Used to store the state, or data of the object instances.
Allows for the creation of a new object. Consists of the constructor name and parameter list.
Necessary keyword for instantiating a new class object.
Create an instance of a class object.
Formal parameters are the parameters outlined in the parameter list in the constructor, while actual parameters are the parameters that are input when a new instance of a class object is created.
Procedures that allow us to control and define the behavior of an object.
Determines who has access to using the method when writing classes and objects.
Indicates what type value is being returned from the method
objectName.method()
The ability to use methods and programs that we do not fully understand, or are unable to write.
Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program.
Used to return a value back to the main program from a method.
Defines which part of the program a variable can be accessed from.
Unable to be changed or manipulated. String are immutable.
The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.
The automatic process of transforming a variables data type. This occurs when a primitive and String object are concatenated by changing the primitive value to a String object type.
Enable users to use special characters and actions within String objects.
Constructs a new String object that represents the same sequence of characters as str
Returns the number of characters in a String object
Returns the substring beginning at index from and ending at index to − 1
Returns substring(from, length())
A String object has index values from 0 to length – 1. Attempting to access indices outside this range will result in this error.
Returns the index of the first occurrence of str; returns -1 if not found
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
APIs and libraries simplify complex programming tasks by providing sets of clearly defined methods of communication among various computing components.
Documentation is the reference for how to use different methods and classes
Static methods are the methods in Java that can be called without creating an object of class. Static methods are called using the dot operator along with the class name unless they are defined in the enclosing class.
The Math class is part of the java.lang package and contains only static methods.
Returns the absolute value of an int value
Returns the absolute value of a double value
Returns the value of the first parameter raised to the power of the second parameter
Returns the positive square root of a double value
Returns a double value greater than or equal to 0.0 and less than 1.0
Can be manipulated to produce a random int or double in a defined range.
Constructs a new Integer object or a new Double Object that represents the specified int or double value
These classes are part of the java.lang package and Object class and have a number of useful methods.
The minimum/maximum value represented by an int or Integer, which are -2147483648 and 2147483647
Returns the value of this Integer as an int and this Double as a double
Automatic conversion between primitive types and their corresponding object wrapper classes
Reverse of autoboxing; automatic conversion from the wrapper class to the primitive type
A keyword that indicates a reference object doesn’t point to any object data.
When a class has more than one constructor with the same name, but different parameter lists.
An if statement lets you ask a question to the program and only run code if the answer is true.
A control structure lets us change the flow of the code.
A statement that evaluates to true or false.
== , !=. <. > , <=, >= These allow for the comparison or primitive type values. The result of these expressions can be stored as a Boolean value.
Control structure that lets us run either one section of code or another depending on a test.
Executes code only if all conditions are false
A statement that executes if the previous statements are false and this statement is true
Can be used to connect boolean expressions to make more complex expression. NOT ! AND && OR ||
When the result of a logical expression using && or || can be determined by evaluating only the first Boolean operand, the second is not evaluated.
The process of placing if statements within if statements.
A truth table is a table used in logic for comparing Boolean expressions.
Two object references are considered aliases when they both reference the same object.
Equality operator (==) compares the references (addresses in memory) of 2 objects
Compares the data of the objects instead of the value of the references. Uses the .equals() method.
Occurs when the expression in a while loop never evaluates to false. The program continues to run infinitely.
Breaks out of a while loop and executes statements that immediately follow while loop.
Keyword used in methods to return a value back to the initial program that called the method.
When a for loop iteration is off by one too many or one too few.
charAt(int index) returns the character at the specified index.
When a loop is placed within another loop. The total number of runs for a nested loop will be the outer loop * inner loop.
Step-by-step process that solves a problem.
The number of times a statement is executed by the program.
A way to represent how long an algorithm will take to execute. It helps to determine how efficient different approaches to solving a problem are.
Allows access to data and methods from classes outside the declaring class.
Restricts access to data and methods to the declaring class.
The process of hiding the implementation details of a class from the user
Methods used to access instance variable and object data. Also referred to as getter methods.
Methods used to change or manipulate instance variable or object data. Also referred to as setter methods.
A variable that references an existing object. When the alias variable is manipulated, so is the original object, and vice versa.
Objects are defined by having the attributes, or instance variables that they are assigned.
Conditions that must be true prior to execution in order for that code segment to behave as expected.
Conditions that must be true after the code segment is executed.
A method that enables user to obtain information about an object’s instance and static variables.
A specific accessor method that returns a String value with information about an object’s instance values. This overrides the object’s inherit toString method when an object is printed using System.out.print or System.out.println
A method that enables user to change the value of an object’s instance and static variables.
Instance variables can be accessed directly by using the reference variable name + . + the instance variable name. This only works within the class file if the instance variables are set to private.
Variables that can be accessed by all objects of a class. They are called using the class name, and can be used in static and non-static methods.
Methods that can be used directly by the class name. They cannot access instance variables or non-static methods.
The process of breaking down large problems into smaller problems, each with a method that defines a subproblem in the larger problem.
If two variables within the same scope have the same name, the variable with the more specific scope will be called.
A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to.
Makes a call to the current object in a class file. Allows programmers to specify which objects and instance variables should be called.
Association for Computing Machinery: organization for computing professionals to provide guidance related to ethics and responsibilities.
When all programs and code will work as intended.
Prejudice in favor of or against one thing, person, or group compared with another, usually in a way considered to be unfair.
Arrays are lists that store many values of the same type
Array values are stored at a particular index and we access elements in the array by referencing this index value. Index values in Arrays start a 0.
Returns the length of the array
Accesses an element in the array to either update or retrieve.
Traversing an array is the process to loop through an array and access each of the elements. Caution must be taken to avoid looping beyond the valid index values.
A loop that is an alternate to a for or while loop that accesses each value in an array starting at the first value and proceeding in order.
Variable created in the enhanced for loop header that contains a copy of the array variable.
Algorithms that are often used in computer science to do basic analysis on a list. These often include traversing and selection processing.
A mutable list of object references. We can create ArrayLists by using the constructor new ArrayList<E>().
A mutable list of object references. We can create ArrayLists by using the constructor new ArrayList<E>().
Methods used to alter the state of an ArrayList
A common error that occurs when attempting to modify an ArrayList while using an enhanced for loop.
Traversing an ArrayList is the process to loop through an ArrayList and access each of the elements. Caution must be taken to avoid looping beyond the valid index values.
An algorithm is a set of steps or rules to follow to solve a particular problem.
Traversing two lists at the same time using the same index often to compare.
An algorithm that searches data sets in a sequential order, checking each value from the 0th index to the end of the data set to see what index a specific element can be located at.
A sorting algorithm that swaps the minimum value left in an array with the current array index.
A sorting algorithm that shifts the already sorted section of an array to place the current array value in the correct index.
Protocols for data sharing on the internet that define rules and conventions for communication between network devices.
The appropriate use of data based on circumstances
The integrity, confidentiality, and availability of data
Arrays that store arrays. The methods associated with these are the same as regular arrays.
The process of traversing a 2D array by accessing all elements in a row before moving on to the next row.
The process of traversing a 2D array by accessing all values at the first column in every row, before moving to the next column
A parent class that contains common attributes and behaviors used by subclasses (children).
A child class that inherits attributes and behaviors from a superclass (parent).
A relationship between two items that represent a superclass / subclass relationship
A relationship between two items that represents an instance variable relationship.
A Java keyword used to refer to the superclass object. In this lesson we saw it used to call the superclass constructor.
Override a method occurs when a subclass has the same method signature as a superclass. When a method is overridden, Java uses the method from the subclass.,
Java key term used to denote the user intendeds to override a method.
A Java keyword used to refer to the superclass object. In this lesson we saw it used to call the superclass constructor and other methods from the superclass.
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
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
The Object class is the superclass of all other classes in Java.
An iterative process where a method calls itself.
The simplest version of our recursive process. This is the point when the problem cannot be reduced any further.
A search technique that starts at the first element and goes through each element until it finds the target value.
A search that starts at the middle of a sorted array or ArrayList and eliminates half of the array or ArrayList in each iteration until the desired value is found or all elements have been eliminated.
Merge sort is a recursive sorting algorithm that can be used to sort elements in an array or ArrayList.
A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.
A method is a way to teach the computer a new command
A variable defined in a Class, for which each object of the class has its own copy.
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.
A type of interface that uses interactive graphical elements such as windows, buttons, and icons.
when programs are used and tested without the user necessarily understanding how each part of the program is working, but are able to understand what the final output or product will be.
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.
If a class A extends the class B, then A is a subclass of B.
If a class A extends the class B, then B is the superclass of A.
The art and science of concealing secret messages in such a way that no one apart from the intended recipient knows about the existence of the message. In digital information, Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video.
A method called on the Class, rather than on a specific object of the Class.
Bit means "binary digit". A bit is a single digit in a binary number. A bit can either be 0 or 1.
The RGB encoding scheme allows us to encode colors as numeric data. It defines the amount of Red, Green, and Blue light in a pixel. Each color channel can have a value between 0 and 255.
Images are made up of pixels, which are essentially a grid of values. Each value, or pixel, encodes the color at that position in the image.
The process of converting information or data into a specific format that can be understood or processed by a computer.
A variable that receives a value passed into a method from outside the method.
A particular way of organizing data in our programs.
A 2D Array is an array of arrays, used to represent tables, grids, and matrices.
The base case is the simplest form of the recursive problem. The base case can be immediately solved without breaking the problem down any further.