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
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.
`lowerCamelCase` is a naming convention where the first letter is lower case, and each subsequent start of a word is upper case.
A command is an instruction you can give to Karel.
Documentation for all Karel Commands and Syntax
A method is a way to teach the computer a new command
Defining a method means to teach the computer a new command and explain what it should do when receiving that command.
Calling a method actually gives the command, so the computer will run the code for that method.
Indentation is the visual structure of how your code is laid out. It uses tabs to organize code into a hierarchy.
The part of the method that contains the commands
Breaking down (decomposing) your code is splitting it up into several smaller, simpler methods
Programs that “Read like a story” have good decomposition and make the code easy to follow.
Top down design is a method for breaking a problem down into smaller parts.
The way your code is written is the style. It covers the aspects of the code that goes beyond whether or not it just works.
A message in your code that explains what is going on.
Assumptions we make about what must be true before a method is called.
What should be true after a method is called
SuperKarel is like Karel but already knows how to turnRight() and turnAround()
A for loop lets us repeat code a **fixed number of times**.
A problem when using a while loop where you forget one action at the beginning or the end.
An edge case is a problem in your code that only occurs in extreme situations.
The run method is where a Java program begins.
Managing complexity by "abstracting away" information and detail, in order to focus on the relevant concepts.
A programming language is any set of rules that converts strings, or graphical program elements in the case of visual programming languages, to various kinds of machine code output.
A set of instructions written in a programming language that can be executed by a computer
sequential programming refers to programs that are executed sequentially – once through, from start to finish, without other processing executing.
Completes multiple tasks at a time, simultaneously.
The primary software that runs applications and manages all the hardware, memory and other software on a computer.
A set of computer instructions that tells the computer how to work.
Most commonly used on a desktop or laptop computer and can perform many tasks without an internet connection.
An operating system used on mobile devices, such as a mobile phone or tablet.
Used on specialized computers that take in requests and send back a response (mail server, web server, etc).
Will only perform one type of task and are used in machines such as an ATM or a GPS system.
An operating system that is permanently etched into a hardware device such as a keyboard or a video card.
Operating systems that are most commonly used to run multiple operating systems on a computer system at the same time.
An operating system such as Windows, Mac OS, Android or iOS.
Software that only works on one platform, such as only on Android phones, or only on Mac computers.
Software that works on multiple platforms.
A circuit board with ports and sockets used to connect the main devices of a computer.
A special kind of firmware that runs programs strictly to start up your computer.
The core component of a device that accepts and executes instructions.
A fast type of computer memory which temporarily stores all the information your device needs right away.
A fast access storage device used in computers.
A component designed to speed up the creation of images and output them to a display device, like a monitor.
A component with a built in wired network port that allows the computer to connect to a network.
A device that will be recognized by your computer and install on its own.
A group of files that allows a device to communicate with the computer’s operating system.
A short-range wireless communication technology that uses radio waves to transmit information.
Enables short-range communication between compatible devices.
An electronic device which is required for communication between devices.
An internal component of a computer that is used for communicating over a network.
A network device that allows a device to connect to the Internet.
Enables wired connections between more than one computer or device.
A network device that allows other Wi-Fi devices to connect to a wired network.
An access point that allows for network management and security configuration.
Storage that is available only while the system is on and disappears when the system is turned off.
Storage that is saved and available even when the system is shut down.
Storage that contains one or more drives that can be accessed over a network.
Network attached storage that is equipped with powerful network adapters.
Used to navigate the world wide web and view HTML files.
A collection of data and files used to increase the speed of the browser.
Program code, usually written in JavaScript, that is executed on the client's browser.
An intermediary between the user and the Internet that takes requests from the user and returns a response.
Confirms the identity and authenticity of a website.
A wireless LAN that uses radio frequency technology to send and receive data.
A virtual LAN that allows for the setup of separate networks by configuring a network device.
A set of protocols that specify how your Wi-Fi network and other data transmissions work.
Digital information generally comprises data that is created by, or prepared for, electronic systems and devices such as computers, screens, calculators, communication devices and so on, and can be stored on those devices or in the Cloud
A number system defines how we represent numbers. It defines which digits we can use, and what value each position (place value) in a number has.
The number base of a number system defines how many digits are in the number system, and the base of the exponent for each place value in a number.
The number system we use in out everyday lives. It has 10 digits, 0-9.
Number system that has 2 digits, 0 and 1. This is how computers represent numbers at the base level.
ASCII is the standard protocol for encoding text information as bits. The ASCII table assigns a unique binary number to every text character.
An image can be represented as a grid of values. Each value encodes the color at that position in the image.
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 hexadecimal number system is the Base 16 number system. It is a number system that only uses 16 digits (0 1 2 3 4 5 6 7 8 9 A B C D E F)
Number system that has 16 digits 1 - 9 and A - F.
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.
The process of encoding information, using fewer bits than the original representation. We can use algorithms to compress the data to use less bits for storage and then decompress it when we want to view it again.
Lossless Compression involves no loss of information. If data have been "losslessly" compressed, the original data can be recovered exactly from the compressed data after a compress/expand cycle.
Throwing away some of the data to save space. We can throw away a lot of data without any noticeable difference from the original.
Bit means "binary digit". A bit is a single digit in a binary number. A bit can either be 0 or 1.
A philosophy of making information and knowledge open and accessible to all people. A network of networks built on open, agreed upon protocols.
A widely agreed upon set of rules that standardize communication between machines.
Used to translate domain names into IP addresses.
A protocol that defines the structure of an Internet address and assigns a unique address to every device on the Internet.
Packets are the units of data that are sent over the network.
HyperText Transfer Protocol is a protocol that standardizes the language for talking to web servers to send and receive web pages, or HyperText information (HTML pages).
Allows for sending MULTIPLE packets between two computers. TCP checks that all packets arrived and can be put back in the proper order. The metadata must include a destination IP address, a from IP address, the message size and the packet order number.
An HTTP request is made by a client, to a named host, which is located on a server. The aim of the request is to access a resource on the server.
An HTTP response is made by a server to a client. The aim of the response is to provide the client with the resource it requested.
Pretending to be a DNS name resolver. Feed your computer the wrong IP address for a given website, and your browser now goes to a false website.
Distributed Denial of Service attack. Spam a web server with so many requests so close together that it crashes. Sometimes spitting out valuable information as it crashes.
Protocols for encrypting/decrypting information. Most cybersecurity breaches happen due to human error, not software bugs.
Identity theft, stealing money, stealing private information, controlling private computers.
Public key encryption is a type of asymmetric key encryption. There’s one key that encrypts the information and there is a different key that decrypts the information.
A group of two or more computer systems linked together.
The process of sending data between two computers on the internet. The data is sent through routers that determine the route.
The usage of deceptive emails and websites to maliciously gather personal information
A new 128 bit version of the Internet Protocol.
Examples of servers include web servers, mail servers, and file servers. Each of these servers provide resources to client devices. Most servers have a one-to-many relationship with clients, meaning a single server can provide multiple resources to multiple clients at one time.
The tools, visual aids, and other components available to a user in order to interact with a web page or other digital or mechanical device
An adjective that generally is used to describe a UI that is intuitive to use, easy to navigate, and allows the user to quickly and efficiently complete the desired task
A model designed to demonstrate the most basic functionality or basic design of a product, sometimes used as a proof of concept
A particular sequence of actions that a user takes to accomplish a particular task
A can-do attitude in which a person views challenges and setbacks as ways to learn rather than terminal obstacles in their path to their goal
A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.
An object is a single instance of a Java class. An object has both state and behavior.
Programming model that focuses on **objects** and the data and actions associated with the objects.
The state of an object is all of the object's associated data. It is the *state* that the object is in.
The behavior of an object is what the object is able to do. It is the actions that can be performed by the object.
Instance is what you call a specific object constructed from a class. Instance and object generally refer to the same thing. An object is a specific instance of a class.
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.
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.
toString is a special method you write in your class that returns a String representation of the object.
A variable that receives a value passed into a method from outside the method.
A method's return type is the type of value returned from that method.
A method's signature is the name of the method and the parameter list.
An instance method is a method that defines the behavior of an object. It defines an action that the object can perform.
Visibility (usually `public` or `private`) defines who has access to something (usually a variable or method). Public means code outside of the class can access, private means only code inside the class can access.
A method called on the Class, rather than on a specific object of the Class.
A variable or attribute of a class that is shared between **all** instance of a class. Each instance **does not** get their own copy.
Related classes are grouped together into packages.
The `this` keyword is a reference to the current object (the current instance).
Class hierarchy refers to the arrangement of classes and how they relate to each other.
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.
A class, usually at the top of a Class Hierarchy, that cannot be instantiated, because not all of its methods are defined.
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.
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.
An interface provides a list of methods that *must* be defined if a class chooses to implement the interface.
The Comparable Interface is a standard interface in Java that mandates that all classes implementing the Comparable interface must define a method called `int compareTo(Object o)` that returns a positive int if the parameter `o` passed in is *less than* the current instance, returns 0 if it is equal, and a negative int if it is greater.
Polymorphism is the capability of a method to do different things depending on which object it is acting upon.
Also called late binding, this refers to Java choosing the proper method to call at run time, as opposed to at compile time.
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 `super` keyword lets us reference the superclass when writing code inside of a subclass.
A variable that is restricted to use in a certain scope of a program
An instance method that allows the client to **get** the value of an instance variable on an object.
An instance method that allows the client to **set** the value of an instance variable on an object.
Classes can have multiple methods with the same name, as long as the parameters to those methods are different. Doing this is called "overloading" a method.
If two variables have the same name, and exist inside of the same scope, the variable with the *more specific* scope takes precedence. This is called shadowing. Local variables and parameters shadow the more general global variables (instance variables).
A symbol or container that holds a value.
When an object is assigned to a variable, the variable doesn't hold all of the object's data, it only holds a *pointer* to the object's data. The variable holds a memory location (think of it as a pointer to that memory location), and the object data is stored at that memory location.
Before an object variable is initialized, it doesn't point to any memory. It holds a **null pointer**.
These classes are part of the java.lang package and Object class and have a number of useful methods.
The Object class is the superclass of all other classes in Java.
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