1/38
Vocabulary flashcards covering Java basics, data types, packaging, classes, methods, GUI tools, strings, casting, and wrapper classes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Package
A collection of related classes; a sub-directory in your project; the package name must match its path in the src folder.
Class
A blueprint for objects that defines their data (fields) and behavior (methods).
Public class
A class declared public; only one public class allowed per source file, and its name must match the filename.
.class file
A compiled Java file containing bytecode; not human-readable.
Field
Variables inside a class that hold the object's data.
Method
Functions that operate on the data of an object.
Static field
A field that belongs to the class itself, not to any particular object instance.
Main method
The entry point of a Java program: public static void main(String[] args).
Primitive Data Types
Java’s built-in types, including int, double, boolean, char, byte, short, long, and float.
int
A 32-bit signed integer data type.
double
A 64-bit floating-point data type with double precision; one of the three emphasized on the AP exam (along with int and boolean).
boolean
A true/false data type.
char
Represents a single Unicode character.
float
A 32-bit floating-point data type; precision is half that of double.
byte
An 8-bit signed integer.
short
A 16-bit signed integer (2 bytes).
long
A 64-bit signed integer (8 bytes).
modulo ( %)
The modulo operation; returns the remainder after division.
Casting
Explicit conversion from one primitive type to another (e.g., (int) price).
Floor
Rounding down to the nearest integer; casting a positive double to int yields the floor value.
Integer.parseInt
Static method in Integer that converts a String to an int (example of a wrapper class utility).
Wrapper Classes
Classes that wrap primitive types as objects: Integer, Double, Character.
Integer
Wrapper class for the int primitive; includes methods like parseInt.
String
A class representing a sequence of characters; strings are objects, not primitive types.
String.equals
Compares two strings for exact, case-sensitive equality.
String.equalsIgnoreCase
Compares two strings for equality ignoring case differences.
String.length
Returns the number of characters in the string.
String.toUpperCase
Returns a new string with all characters converted to upper case.
String.toLowerCase
Returns a new string with all characters converted to lower case.
String.indexOf
Returns the index of the first occurrence of a character or substring, or -1 if not found.
String.substring
Returns a portion of the string between specified start and end indices.
IDE
Integrated Development Environment; software for writing, compiling, and debugging code.
JVM
Java Virtual Machine; runs Java bytecode.
Swing
Classic Java GUI toolkit; part of the javax.swing package.
JavaFX
Modern GUI toolkit designed as a replacement for Swing; not automatically included with the JDK since version 11.
package path rule
The package name must correspond to its directory path under the src folder.
Public
Access modifier indicating visibility; in Java, a file can have one public class whose name matches the filename.
static
Keyword for class-level members or methods (shared by all instances), as opposed to instance-level.
void
Return type indicating a method does not return a value.