Java Terminology-3157
Java Terminology-3157
Java Terminology-3157
Java Terminology
We should know some terms in Java before we begin with Java programming. Below is
a brief description of terminologies(given in figure 1.1) often used in Java.
b. Java Compiler: A program that takes the text file and compiles it into a
platform-independent Java file.
d. JVM (Java virtual machine): It enables a computer to run Java programs (other
programs also) written in different languages that are also compiled into Java
bytecode.
When our software executes a particular program, it requires some environment to run
in. Usually, it is any operating system, for example, Unix, Linux, Microsoft Windows, or
macOS. Here JRE acts as a translator and supporter between the operating system and
the java program.
1. Compile the Code: JDK (Java Development Kit) provides a JAVAC compiler to get
through this step. JDK converts source code into compiled code (a specific
format) that can be easily interpreted by the JRE(Java Run-time Environment).
2. Run the Code: The bytecode provided by the compiler is run using JVM. JAVAC
compiler produces compiled code which is converted to machine code using
platform-specific JVMs. Different platforms have different JVMs. JVMs convert
the bytecode into platform-specific machine code.
2. Platform Independent:
- Java is platform-independent because it uses JVM, which compiles source code
into bytecodes.
- Bytecodes can run on any operating system, be it Linux, Windows, or macOS,
which means if we compile a program on Linux OS, then we can run it on
Windows OS and vice-versa.
- Every OS has its own JVM (Java Virtual Machine), but the output produced by all
the OS is the same after the execution of the bytecode.
- This feature makes Java programs more simple, more secure, and more
portable.
- Writing code once and running it anywhere is an alluring feature of being
platform independent language.
3. Robust:
- Java is reliable because it is developed in such a way that the Java compiler
detects even those errors that are not easily detected by other programming
languages.
- Features like robust garbage collection, memory allocation, and Exception
Handling makes it more reliable.
- Java uses a JIT (Just In Time) compiler where the code is executed on demand
by the compiler.
- This way, only those methods are completed that are called making applications
execute faster.
4. Multithreading:
- Java program allows execution of more than one part of a program at one
instance for maximum utilization of the CPU.
5. Distributed:
- Java facilitates users to create distributed applications.
- RMI (Remote Method Invocation) and EJB(Enterprise Java Beans) are used for
creating distributed applications.
- This feature of Java makes us able to access files by calling the methods from
any machine on the internet.
Applications of Java
Java programming language provides features like High Performance, Dynamic,
Multithreaded, and Distributed programming. Therefore, it is fit for multiple platforms,
i.e., once code is written in Java, it can be run on any platform. There are various types
of applications of the Java programming language.
● Mobile applications.
● Standalone applications.
● Web applications.
● Enterprise applications.