1/20
I FUCKING HATE CODING BUT WE BALL
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Compiler
A program that translates source code written in a high-level programming language (Java in this case) into machine code that a computer can execute.
Compiler/Syntax Error
Definition: Compiler error happens during code translation to machine code.
Causes: Syntax, type errors, missing libraries, wrong function calls.
Impact: Stops program compilation or execution.
Examples: Missing semicolons, wrong parentheses, undeclared variables.
Resolution: Fix code based on error messages.
Main Method
Main Method: The entry point of a Java program where execution begins. It must be public, static, void, and accept an array of Strings as arguments.
Variable
A name associated with a memory location in the computer
Declaring a Variable
Specifying the type and name for a variable. This sets aside memory for a variable of that type and associates the name with that memory location
Initializing A Variable
Setting a value to a variable when it is first created in a program, typically done using an assignment statement.
Data type
defines the type of data a variable can hold, such as integer, string, or boolean. It helps in determining the operations that can be performed on the data.
Integer
A whole number that can be positive, negative, or zero. It does not include fractions or decimals. Examples include -3, 0, and 5.
Boolean
An expression that is either true or false
Camel Case
One way to create a variable name by appending several words together and uppercasing the first letter of each word after the first word
Casting a Variable
Converting a data type to another for operations, ensuring compatibility. E.g., changing an integer to a string for concatenation. This is done using (type) name.
Operator
Common mathematical symbols such as + and *
Compound assignment/Shortcut Operators
shorthand notations in programming that combine arithmetic operators with the assignment operator. They simplify code by operating and assignment in one step. E.g. x++ which means x = x + 1
Remainder
The % (mod) operator which returns the remainder from one number divided by another
Arithmetic Expression
A sequence of operands and operators that describer a calculation to be performed, for example 3 * (2+x)
Operator Precedence
Some operators are done before others, for example, *,/,% have precedence over + and -, unless parenthesis are used. Rules of PEMDAS apply
boolean(type)
used to declare a variable that can only have the value true or false
double / int / String (type)
used to declare a variable of types double, int, or String
System.out.print() / System.out.println()
you know what this fucking does you soggy bucket of unseasoned chips
=
Used for assignment to a variable
==
a comparison operator used to check if two values are equal in programming languages.