EXAM 1 Flashcards
Hardware
The physical components of a computer
Main Memory
Storage locations that are directly accessible by the processor(AKA Primary Storage)
Binary
A number system only using 0’s and 1’s
Syntax Error
Incorrect lines of code in a program
Binary Digit(bit)
The smallest unit of data a compute can process and store (0’s and 1’s)
Software
Instructions that tell a computer what to do
Secondary Storage
long term storage component of a computer, such as hard disk drives or solid state NVRAM
System.out
Refers to an object, used to display output to the computer console
Logic Error
a bug causing a program to run incorrectly, but not cause the program to crash
Byte
a unit of data that Is 8 binary digits (0’s and 1’s) long
CPU
Central Processing Unit, carries out the processing of the computers systems and apps
Machine Code
low level machine code written in binary and hexidecimal digits
Pseudo Code
readable description of what a program or algorithm should do
Algorithm
A set of instructions designed to complete a task
Word
a unit of data of a defined bit length that can be addressed and moved between storage and the computer processor.
Variable
a named container for a specific type of data (string, bits, double, int, float …)
Scope
The area in a computer program that a variable can be recognized an used (variables cannot be used outside of the method they are initiated in)
reserved words
words that cannot be used as variable names, classes, or methods (boolean, byte, abstract, char, class …)
character
a data type that is used to store a single character ( always use single quotes ‘’ to store a char)
comment
notes readable by the user but ignored by the compiler (/**/, //)
primitive type variable
a primitive variable’s information is stored as the value of that variable ( boolean, byte, short, int, long, float double)
Declaration
A method by which a variable is given a name and a value in Java
static and instance methods
Instance- methods that require an object of it’s class to be created before it can be called
Static- methods that do not require an object of it’s class to be created before it can be called
Integer
Data type used for referencing whole numbers in java
String
an object that represents a sequence of character values
assignment
using the ‘=’ sign to declare a value to a variable
reference type variable
store the addresses of objects, not the actual value of the object
variable initialization
Specifying an initial value to give to a variable
identifiers
names of variables (cannot be reserved words, cannot start with numbers or signs, no spaces)
floating point numbers
data type that contains decimal parts, stores using 4 bytes
literal
any constant value that can be assigned to a variable
expression
a construct made up of variables, operators, and methods
Public Interface
an interface in Java is a blueprint of a behavior. A Java interface contains static constants and abstract methods.
return values
the result of a functions execution
expressions
a structure consisting of variables, operators, and method calls, all arranged according to the programming language syntax, and returning a single value
increment/decrement
Increment- “++” used to add one to a variable. ++x adds one before it is used and x++ adds one after its used
Decrement- “–” used to subtract one from a variable
method
a block of code that, when called, performs specific actions mentioned in it. (print, println, Math.sqrt)
void
keyword telling compiler that a function will not be returning any values after execution
assignment operators
symbols used for performing specific tasks in java
String input
allows you to assign a name to a string expression
method arguments
the actual values that are passed when a method is used
package
a mechanism for storing java classes
magic number
A Magic Number in Java refers to a numeric value that appears directly in the code without any explanation of its meaning. It lacks context and clarity, making the Java code harder to understand and maintain. Its better to give a number a name and type before using it again.
Class Scanner
a class used to receive user input
If statement
a statement used to specify a block of code to be executed, if a condition is true
if/ else
a conditional statement that allows you to specify multiple conditions to be evaluated in a sequence.
cascading IF statements
placing an if statement inside of another if/ else if statement
relational If operators
== tests if 2 values are equal
string.equals() tests if 2 strings are identical
Logical operatros or connectors
&& for 2 conditions to be true “||” for one of or both of 2 conditions to be true