1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Java
A high-level, object-oriented, and multi-platform programming language created by Sun Microsystems in 1995.
Write Once, Run Anywhere (WORA)
Java’s feature that allows code to be written once and run on any platform (Windows, Linux, Mac, Android, etc.).
Common Uses of Java
Web apps, mobile apps, enterprise software, AI, IoT, big data, and cloud computing.
Java Runtime Environment (JRE)
Software needed to run Java programs; provides class libraries and system resources.
Advantages of Java
Active community, many learning resources, built-in libraries, high security, platform independence.
Java Virtual Machine (JVM)
A runtime engine that executes Java bytecode by converting it into machine language.
Compiler in Java
Translates Java source code (.java file) into bytecode.
Interpreter in Java
Executes bytecode line by line inside the JVM.
Bytecode
Intermediate code generated by the Java compiler that runs on the JVM.
Java API
A collection of pre-written classes and methods that provide built-in functionalities (e.g., Math, Date).
Class
The basic unit of a Java program that defines objects, data, and methods.
Identifier
A name given to a program component (class, object, or variable). Must follow rules: start with a letter/_/$, case-sensitive, cannot use reserved words.
Reserved Words (Keywords)
Special Java words with predefined meanings (e.g., class, public, static, void, int, if, return).
Main Method
The entry point of a Java program:
public static void main(String[] args)
public
An access modifier that makes the method accessible everywhere.
static
Indicates the method belongs to the class and can run without creating an object.
void
Means the method does not return a value.
String[] args
Parameter of the main method; an array of Strings used to pass arguments to the program.
Array
A collection of similar data types stored together.
String
A sequence of characters (letters, numbers, symbols).
System.out.println()
A command that prints output to the console.
Literal String
Text inside double quotes ("Hello World"
) that appears exactly as written.
Comment (Single-line)
Starts with //
and is ignored by the compiler.
Comment (Multi-line)
Placed between /*
and */
; ignored by the compiler.
Java Development Kit (JDK)
A complete set of tools (includes JRE + compiler + debugger) for developing and running Java programs.
javac command
Command used to compile Java programs (e.g., javac Demo.java
).
java command
Command used to run compiled Java programs (e.g., java Demo
).
Execution Steps in Java
Write code → Save as .java
→ Compile with javac
→ Run with java
.