Java is a high-level, general-purpose, object-oriented, and secure programming language.
History of java
platform independent and needed to be recompiled for each different processor.
le) that can run on any platform (OS
+ Processor).
Developed by the Sun Microsystems.
name was Oak. Since Oak was already registered company, so James Gosling and his team
changed the name from Oak to Java.
quantities by the Java language's creators.
Features of Java
1. Simple: Java is a simple language because its syntax is simple, clean, and easy to understand. Complex and
ambiguous concepts of C++ are either eliminated or re-implemented in Java. For example, pointer and operator
overloading are not used in Java.
2. Object-Oriented: In Java, everything is in the form of the object. It means it has some data and behavior. A
program must have at least one class and object.
3. Robust: Java makes an effort to check error at run time and compile time. It uses a strong memory
management system called garbage collector. Exception handling and garbage collection features make it
strong.
Secure: Java is a secure programming language because it has no explicit pointer and programs runs in the
virtual machine. Java contains a security manager that defines the access of Java classes.
5.Platform-Independent: Java provides a guarantee that code writes once and run anywhere. This byte code is
platform-independent and can be run on any machine.
6. Portable: Java Byte code can be carried to any platform. No implementation dependent features. Everything
related to storage is predefined, for example, the size of primitive data types.
7. High Performance: Java is an interpreted language. Java enables high performance with the use of the Just-
In-Time compiler.
, 8. Distributed: Java also has networking facilities. It is designed for the distributed environment of the internet
because it supports TCP/IP protocol. It can run over the internet. EJB and RMI are used to create a distributed
system.
9. Multi-threaded: Java also supports multi-threading. It means to handle more than one job a time.
10. Compiled and interpreted language :Java uses a two step translation process. Java source code is
compiled down to "byte code" by the Java compiler (javac). Then byte code is converted into machine code by
the Java Interpreter (Java Virtual Machine - JVM).
Java Environment
The Java Environment Concept refers to the various components and systems that work together to enable the
development, execution, and management of Java applications. It encompasses the tools, platforms, and
technologies that make Java a portable, secure, and efficient programming language. Here's a breakdown of the
main components of the Java environment:
1. Java Development Kit (JDK)
The JDK is a collection of tools required for Java development. It includes everything that a developer needs to
create Java programs.
javac: The Java compiler that compiles Java source code (.java files) into bytecode (.class files).
java: The Java interpreter that runs the compiled bytecode on the Java Virtual Machine (JVM).
Javadoc: A tool for generating documentation from Java source code.
Java Debugger (jdb): A tool for debugging Java applications.
The JDK includes both the Java Runtime Environment (JRE) and additional development tools necessary for
compiling and running Java programs.
2. Java Runtime Environment (JRE)
The JRE provides everything necessary to run Java applications. It includes the following components:
Java Virtual Machine (JVM): The JVM is a critical part of the JRE. It executes Java bytecode and
provides platform independence by allowing Java applications to run on any system that has a
compatible JVM.
Java Class Libraries: These are predefined classes and packages (such as java.util, java.io, etc.) that
provide essential functionalities for Java applications.
Runtime Support: The JRE includes the necessary runtime environment for executing Java programs,
such as garbage collection, memory management, etc.