Key Java Fundamentals: JVM, JRE, JDK, Environment Variables, Data Types, Memory, and More
This article provides concise explanations of core Java concepts including the differences between JVM, JRE and JDK, the roles of PATH and CLASSPATH, variable usage, operators, naming rules, data types, type conversion, Java architecture tiers, cross‑platform nature, signed number representations, functions, overloading, arrays, and memory structure.
1. JVM, JRE and JDK differences: JVM (Java Virtual Machine) enables Java's cross‑platform capability; JRE (Java Runtime Environment) includes JVM plus core libraries; JDK (Java Development Kit) adds development tools to JRE.
2. Purpose of environment variables PATH and CLASSPATH: PATH specifies directories for executable .exe files; CLASSPATH defines directories where the JVM searches for .class files.
3. Purpose of variables: Variables store data, allowing repeated use of values of the same type.
4. Difference between & and &&: && performs short‑circuit evaluation on boolean expressions; & evaluates both sides and works with boolean and numeric types.
5. Identifier naming rules: Can contain letters, digits, underscore (_) and dollar sign ($), cannot start with a digit, and must not be a Java keyword.
6. Data types: Primitive types (byte, short, int, long, float, double, char, boolean) and reference types (classes, interfaces, arrays).
7. Type conversion: Implicit conversion from lower to higher precision; explicit casting required when converting from higher to lower precision.
8. Java's three technology stacks: J2EE (enterprise applications, e.g., Servlets, JSP), J2SE (standard desktop/business applications), J2ME (mobile and embedded devices).
9. Java's cross‑platform nature: Java programs run on any OS with a JVM installed, which handles execution.
10. Signed number representations: Original code, one's complement, and two's complement.
11. Functions: Defined within classes, encapsulate functionality, enable reuse, executed only when called; void indicates no return value.
12. Overloading: Multiple methods with the same name but different parameter lists within a class; return type is irrelevant.
13. Arrays: Collections of elements of the same type, indexed from 0 for easy access.
14. Memory structure: Stack (local variables), Heap (objects and arrays), Method area (static members, constructors, constant pool, thread pool), Native method area (OS‑specific).
Study Java students, pay attention! If you encounter problems or need resources, join the Java study group (ID: 232300090) to learn together.
Java Captain
Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.