About Java programming
Java is a general-purpose computer programming language that is concurrent, class-based, and object-oriented. It includes the following functionalities:
- Real-world programming
- Reusability (reuse of components once created)
- Modularity (modifying a required object without affecting the functionality of the other object)
- Resilience to change (redefining the system without any major change in other parts)
- Information hiding (limited access to information can be given to the user, resulting in security in a program)
How does Java work?
- Java programs are written in
.java
files. - When the
.java
file is executed, Java Virtual Machine (JVM) will interact with one of its components, Compiler, which will convert the.java
file to a.class
file. - Interpreter is another component of Java Virtual Machine that will interact with the
.class
file in runtime, that is, at the time of execution, and this provides the output.Note
JVM (Java Virtual Machine) + JRE (Java Runtime Environment) = JDK...