Java
- James Gosling is known as the father of Java.
- Java is an object-oriented, class-based, concurrent, secured and general-purpose computer-programming language.
- Initial Name was oak which was renamed to java
- Main aspects for language
- Simple
- Platform independent - JVM & bytecode
- Object-oriented programming language (except for the primitive types)
- write once run anywhere - JVM, architecture neutral
- robust
- High Performance (JIT)
- More detailed History
Basic Flow
Section titled “Basic Flow”flowchart TD
src -- compiled to (javac) --> bytecode;
bytecode -- interpreted by JVM (java) --> execution;
From
Java 11onwards, the compilation and execution step can becombinedinto a single step. Limitation is that all the source must be written in a single.javafile, instead of multiple files.
Java Editions
Section titled “Java Editions”- Java Standard Edition (Java SE)
- includes - JDK, JRE, Core Libraries, Java APIs, Languages features etc.
- fundamental features for security, netowrking and GUI development etc.
- Java Enterprise Edition (Java EE)
- Extends Java SE, inclues Java Persistentce API, Java Server Pages, Enterprise java bean(ejb) also.
- adds collection of specification for commercial application
- Java Micro Edition (Java ME) - mobile and embedded devices.
- JavaFX - graphics
Java Feature Releases
Section titled “Java Feature Releases”JDK 1.0- Initial release of Java.JDK 1.1- Added inner classes, JDBC, and AWT improvements.J2SE 1.2 (Java 2)- Introduced Swing, Collections framework.J2SE 1.3- Introduced HotSpot JVM, JNDI, and naming conventions.J2SE 1.4- Added assert keyword, regular expressions, and Java Web Start.J2SE 5.0 (Java 5)- Introduced generics, metadata annotations, and the enhanced for loop.Java SE 6 (Java 6)- Added scripting support, monitoring enhancements, and the Java Compiler API.Java SE 7 (Java 7)- Introduced try-with-resources, diamond operator, and strings in switch statements.Java SE 8 (Java 8)- Landmark release with lambdas, Stream API, java.time package, and Nashorn JavaScript engine.Java SE 9 (Java 9)- Introduced the module system (Project Jigsaw).Java SE 10 (Java 10)- Focused on developer productivity with local-variable type inference (var).Java SE 11 (Java 11) LTS- LTS release with deprecated features removed and stability improvements.Java SE 12 (Java 12)- Introduced switch expressions (preview feature) and GC improvements.Java SE 13 (Java 13)- Added text blocks and enhancements to switch expressions.Java SE 14 (Java 14)- Introduced pattern matching for instanceof, records, and text blocks.Java SE 15 (Java 15)- Featured sealed classes, pattern matching for records, and more.Java SE 16 (Java 16)- Introduced new language features and Unix domain socket channel.Java SE 17 (Java 17) LTS- The latest LTS release, focusing on long-term support and enhancements.Java SE 18 (Java 18)- UTF by default, Javadoc code snippets, Switch pattern matching, Vector API, Foreign function & memory APIJava SE 19 (Java 19)- Foreign function & memory API, Switch pattern matching, Vector API, Structured concurrencyJava SE 20 (Java 20)- Scoped valuesJava SE 21 (Java 21) LTS- Record patterns, pattern matching for switch, virtual threads, String templates, unnamed classes and main methodsJava SE 22 (Java 22)
Java Environment
Section titled “Java Environment”- package of tools and runtime needed for java application development such as compiler, debugger etc + JRE.
- package of tools that enables execution of java applications, includes JVM, libraries etc.
- a virtual machine which is used to execute the java programs.
Environment Variables
Section titled “Environment Variables”JAVA_HOMECLASSPATH- default value.i.e current directory, preferred