← Back to Week 1 Hub

Glossary / Key Terms

Every important term from Week 1 — search or browse by topic

🔍
Java Basics
JDK (Java Development Kit)
The full toolkit for Java developers. Includes the compiler (javac), the JRE, and development tools. You need this installed to write and compile Java programs.
JRE (Java Runtime Environment)
The subset of the JDK needed to run Java programs. Contains the JVM and standard libraries, but not the compiler. End users only need this.
JVM (Java Virtual Machine)
The engine that actually runs your Java bytecode. Each operating system has its own JVM, which is how Java achieves "Write Once, Run Anywhere."
Bytecode
The intermediate code produced by the Java compiler. It is not human-readable and not machine code — the JVM translates it to machine instructions at runtime.
HelloWorld.java → javac → HelloWorld.class (bytecode)
Compiler (javac)
The program that converts your .java source code into .class bytecode files. It also checks for syntax errors before creating the bytecode.
Source Code
The human-readable Java code you write in .java files. This is what gets compiled into bytecode.
.java File
A text file containing your Java source code. The filename must match the public class name inside it.
// File: HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello!"); } }
.class File
The compiled bytecode file produced by javac. This is what the JVM reads and executes. You never edit these directly.
main Method
The entry point of every Java program. The JVM looks for this exact signature to start execution.
public static void main(String[] args) { // Your program starts here }
Class
A container for your code in Java. Every Java file must have at least one class, and the filename must match the public class name.
Package
A folder-like grouping that organizes your Java classes. Written in lowercase with dots as separators (e.g., com.pluralsight.app).
package com.pluralsight.app;
Import
A statement that lets you use classes from other packages without typing their full name every time.
import java.util.Scanner;
Data Types & Variables
Variable
A named container that holds a value in memory. You must declare its type before using it.
int age = 25; String name = "Alice";
Data Type
Tells Java what kind of value a variable can hold (number, text, true/false, etc.) and how much memory to reserve for it.
Primitive Type
One of Java's 8 built-in basic types that store simple values directly in memory: byte, short, int, long, float, double, boolean, char.
int, double, boolean, char, byte, short, long, float
The 8 primitive types. int (whole numbers) and double (decimal numbers) are the most commonly used. boolean holds true/false. char holds a single character.
int count = 10; double price = 9.99; boolean isActive = true; char grade = 'A';
String (Reference Type)
A sequence of characters (text). Unlike primitives, String is a reference type — the variable holds a reference to the text in memory, not the text itself. Always use .equals() to compare Strings, not ==.
String greeting = "Hello, World!";
final (Constant)
The final keyword makes a variable's value unchangeable after it is assigned. By convention, constant names use ALL_CAPS.
final double TAX_RATE = 0.08;
Literal
A fixed value written directly in your code. Examples: 42 is an int literal, 3.14 is a double literal, "hello" is a String literal.
Widening (Implicit Conversion)
Automatic conversion from a smaller type to a larger type. No data is lost, so Java does it for you without any special syntax.
int x = 10; double y = x; // Widening: int → double (automatic)
Narrowing (Explicit Conversion / Casting)
Converting from a larger type to a smaller type. Data might be lost (e.g., decimals get truncated), so you must use a cast to tell Java you accept the risk.
double price = 9.99; int rounded = (int) price; // Narrowing: 9 (decimal lost)
Type Casting
Explicitly converting a value from one type to another using parentheses with the target type. Required for narrowing conversions.
double d = 7.5; int i = (int) d; // Cast: i = 7
Operators
Arithmetic Operators (+, -, *, /, %)
Math operators for addition, subtraction, multiplication, division, and modulo (remainder). When both operands are int, division truncates the decimal.
int sum = 10 + 3; // 13 int quot = 10 / 3; // 3 (not 3.33!) int rem = 10 % 3; // 1
Modulo (%)
Returns the remainder after division. Useful for checking even/odd, cycling through values, or wrapping around ranges.
System.out.println(10 % 3); // 1 System.out.println(8 % 2); // 0 (even number)
Assignment Operator (=)
Stores the value on the right side into the variable on the left. This is not the same as "equals" in math — it means "assign."
int x = 5; // Assign 5 to x
Compound Assignment (+=, -=, *=, /=, %=)
Shorthand that combines an arithmetic operation with assignment. x += 3 means the same as x = x + 3.
int score = 10; score += 5; // score is now 15 score -= 3; // score is now 12
Increment (++) / Decrement (--)
Adds 1 or subtracts 1 from a variable. Can be prefix (++x) or postfix (x++).
int x = 5; x++; // x is now 6 x--; // x is back to 5
Pre-increment vs Post-increment
++x increments first, then returns the new value. x++ returns the current value first, then increments. The difference matters when used inside an expression.
int x = 5; int a = ++x; // x becomes 6, a = 6 (increment first) int b = x++; // b = 6 (use current), x becomes 7
Concatenation
Using + to join Strings together, or to join a String with another value. Java automatically converts the non-String side to text.
String msg = "Score: " + 95; // "Score: 95"
Comparison Operators (==, !=, <, >, <=, >=)
Compare two values and return true or false. Used in if statements and loops. For Strings, use .equals() instead of ==.
int age = 18; boolean canVote = (age >= 18); // true
Logical Operators (&&, ||, !)
&& (AND) requires both sides true. || (OR) requires at least one side true. ! (NOT) flips true to false and vice versa.
if (age >= 18 && hasID) { System.out.println("Entry allowed"); }
Ternary Operator (?:)
A compact one-line if/else. Syntax: condition ? valueIfTrue : valueIfFalse.
String status = (age >= 18) ? "adult" : "minor";
Input / Output
Scanner
A class from java.util that reads user input from the keyboard (System.in). Create one in main and pass it to other methods that need input.
Scanner scanner = new Scanner(System.in); System.out.println("Enter your name:"); String name = scanner.nextLine();
System.out.println()
Prints text to the console followed by a new line. This is the standard way to display output and prompts in this course.
System.out.println("Hello, World!");
System.in
The standard input stream — represents keyboard input. You pass it to Scanner to read what the user types.
nextLine(), nextInt(), nextDouble()
Scanner methods that read different types of input. nextLine() reads a full line of text. nextInt() and nextDouble() read numbers but leave the newline character in the buffer.
String name = scanner.nextLine(); int age = scanner.nextInt(); double gpa = scanner.nextDouble();
printf / Format Specifiers (%d, %f, %s, %.2f)
Formatted output using placeholders: %d for integers, %f for decimals, %s for strings, %.2f for 2 decimal places.
System.out.printf("Price: $%.2f%n", 9.5); // Output: Price: $9.50
CRLF / Line Separator
The invisible newline characters at the end of each line of input. On Windows, this is both a Carriage Return and Line Feed (\\r\\n). Understanding this explains the Scanner buffer problem.
Buffer (Scanner Buffer)
Scanner stores incoming input in a buffer. When nextInt() reads a number, it leaves the newline in the buffer. A following nextLine() picks up that leftover newline and appears to "skip." Fix: add an extra scanner.nextLine() after nextInt().
int age = scanner.nextInt(); scanner.nextLine(); // Consume leftover newline String name = scanner.nextLine(); // Now works correctly
Control Flow
if Statement
Runs a block of code only when a condition is true. The most basic way to make decisions in your program.
if (temperature > 100) { System.out.println("It's boiling!"); }
if / else
Adds an alternative block that runs when the condition is false. Exactly one of the two blocks will always execute.
if (age >= 18) { System.out.println("Adult"); } else { System.out.println("Minor"); }
else if
Chains multiple conditions together. Java checks each one in order and runs the first block whose condition is true.
if (score >= 90) { System.out.println("A"); } else if (score >= 80) { System.out.println("B"); } else { System.out.println("C or below"); }
switch Statement
An alternative to long if/else chains when comparing one variable against specific values. Cleaner for menus and category-based logic.
switch (day) { case "Monday": System.out.println("Start of week"); break; default: System.out.println("Another day"); }
case / break / default
case defines a value to match. break exits the switch (without it, execution "falls through" to the next case). default runs if no case matches.
Fall-through
When a case block is missing break, execution continues into the next case. This is usually a bug, but sometimes used intentionally to group cases.
Arrow Syntax (Java 14+)
A modern switch syntax using -> instead of : and break. No fall-through risk — each case runs only its own code.
switch (day) { case "Monday" -> System.out.println("Start of week"); case "Friday" -> System.out.println("Almost weekend!"); default -> System.out.println("Another day"); }
Methods
Method
A named block of code that performs a specific task. Methods let you organize code into reusable pieces instead of repeating yourself.
public static int add(int a, int b) { return a + b; }
Method Signature
The combination of the method's name and its parameter list. Java uses this to identify which method you are calling.
// Signature: add(int, int) public static int add(int a, int b)
Parameter vs Argument
A parameter is the variable in the method definition. An argument is the actual value you pass when calling the method.
// "a" and "b" are parameters public static int add(int a, int b) { return a + b; } // 3 and 4 are arguments int result = add(3, 4);
Return Type
Declared before the method name, it tells Java what type of value the method sends back. If the method returns nothing, use void.
void
A return type meaning the method does not return a value. Used for methods that just perform an action (like printing).
public static void greet(String name) { System.out.println("Hello, " + name); }
return Statement
Sends a value back to the caller and exits the method immediately. The returned value must match the method's declared return type.
public static double calculateTax(double amount) { return amount * 0.08; }
static Method
A method that belongs to the class, not to an object. You can call it without creating an instance. In Week 1, all your methods are static because you haven't learned objects yet.
public static void displayMenu(Scanner scanner) { // Called as: displayMenu(scanner); }
Method Call
Running a method by writing its name followed by parentheses with any required arguments. Execution jumps to that method and returns when it finishes.
int result = add(3, 4); // Calls the add method
Call Stack
A "stack" of method frames that tracks which methods are currently running. When you call a method, a new frame is pushed on. When it returns, the frame is popped off. The bottom is always main().
DRY (Don't Repeat Yourself)
A principle: if you write the same code in multiple places, extract it into a method. This makes code easier to maintain and less error-prone.
Version Control
Git
A distributed version control system that tracks changes to your files over time. You interact with Git through the IntelliJ GUI — the Commit panel, push, pull, and file color indicators.
Repository (Repo)
A project folder tracked by Git. It contains your files plus a hidden .git folder that stores the full history of every change.
Commit
A snapshot of your project at a specific point in time. Each commit has a message describing what changed. You can always go back to any previous commit.
Push / Pull
Push uploads your local commits to the remote server (GitHub). Pull downloads new commits from the remote to your local machine.
Remote (Origin)
A copy of your repository hosted on a server (like GitHub). The default remote is named "origin." Push sends your commits there; pull brings commits down.
Branch
An independent line of development. The default branch is main. Branches let multiple people work on different features without interfering with each other.
Distributed Version Control
A system where every developer has a complete copy of the project history on their own machine. If the server goes down, no work is lost.
GitHub
A website that hosts Git repositories online. You use "Share Project on GitHub" from IntelliJ to upload your project, and push/pull to keep it synced.
Project Structure
Maven
A build tool that manages your Java project structure, dependencies, and compilation. IntelliJ uses Maven to organize the standard folder layout.
pom.xml
The Maven configuration file at the root of your project. It defines the project name, version, and any external libraries (dependencies) your project uses.
src/main/java
The standard folder where your Java source code lives in a Maven project. All your .java files go here, organized by package.
src/test/java
The standard folder for test code in a Maven project. Test files verify that your main code works correctly. You will learn testing in a later module.
Artifact / Group ID
Group ID identifies your organization (e.g., com.pluralsight). Artifact ID is the name of your specific project. Together they uniquely identify your project in Maven.
No terms match your search. Try a different keyword.

Tip: Use Ctrl+F for browser-level search, or use the filter box above to narrow by topic and term name.

← Week 1 Cheat Sheet Common Errors Guide →