- Hướng đối tượng: thiết kế xoay quanh class/object — encapsulation, inheritance, polymorphism, abstraction (trừ primitive type).
- Độc lập nền tảng ("WORA"):
javacbiên dịch ra bytecode; JVM trên mọi OS đều chạy được cùng file.class. - Robust: type checking chặt, exception handling, không có con trỏ → tránh được lỗi segmentation fault.
- Multi-threaded:
Thread,synchronized,java.util.concurrentcó sẵn. Java 21 thêm Virtual Threads — hàng triệu thread nhẹ. - Bảo mật: JVM sandbox + bytecode verifier + không truy cập memory trực tiếp.
Bonus: JIT compiler (HotSpot) optimize hot code lúc runtime → Java thường nhanh ngang C++ ở server workload sau warm-up.
- Object-oriented: designed around classes/objects — encapsulation, inheritance, polymorphism, abstraction (primitives aside).
- Platform-independent ("WORA"):
javacproduces bytecode; the JVM on any OS runs the same.classfile. - Robust: strict type checking, exception handling, no pointers → avoids whole classes of segfault bugs.
- Multi-threaded:
Thread,synchronized,java.util.concurrentare built-in. Java 21 adds Virtual Threads — millions of lightweight threads. - Secure: JVM sandbox + bytecode verifier + no direct memory access.
Bonus: the JIT compiler (HotSpot) optimises hot code at runtime → Java often matches C++ on server workloads after warm-up.