0% found this document useful (0 votes)
17 views14 pages

Topic 1_Introduction to Java Programming (1)

Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1995, now owned by Oracle, and is used across various platforms and applications. It is known for its simplicity, portability, and strong community support, making it a popular choice for aspiring software engineers. Key components of Java include the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM), which together facilitate the development and execution of Java applications.

Uploaded by

joyikehi7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
17 views14 pages

Topic 1_Introduction to Java Programming (1)

Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1995, now owned by Oracle, and is used across various platforms and applications. It is known for its simplicity, portability, and strong community support, making it a popular choice for aspiring software engineers. Key components of Java include the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM), which together facilitate the development and execution of Java applications.

Uploaded by

joyikehi7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 14

INTRODUCTION TO JAVA PROGRAMMING

What is Java?

Java is a popular high-level, object-oriented programming language, which was


originally developed by Sun Microsystems and released in 1995. Currently, Java is
owned by Oracle and more than 3 billion devices run Java. Java runs on a variety of
platforms, such as Windows, Mac OS, and the various versions of UNIX. Today Java is
being used to develop numerous types of software applications including Desktop
Apps, Mobile apps, Web apps, Games, and much more.

Java is a general-purpose programming language intended to let programmers


Write Once, Run Anywhere (WORA). This means that compiled Java code can
run on all platforms that support Java without the need to recompile.
Why Learn Java?

Java is a MUST to learn programming language for students to become a great


Software Engineer specially when they are working in Software Development Domain.
Java is fairly easy programming language to learn, so if you are starting to learn any
programming language then Java could be your great choice.
There are many other good reasons which makes Java as the first choice of any
programmer:

❑ Java is Open Source which means its available free of cost


❑ Java is simple and so easy to learn
❑ Java is much in demand and ensures high salary
❑ Java has a large vibrant community
❑ Java has powerful development tools

❑ Java is platform independent


History of Java?
Java programming language was originally developed by Sun Microsystems which
was initiated by James Gosling in June 1991 for use in one of his many set-top box,
televisions etc. projects.
The language, initially called ‘Oak’ after an oak tree that stood outside Gosling's office,
also went by the name ‘Green’ and ended up later being renamed as Java, from a list
of random words.
Sun released the first public implementation as Java 1.0 in 1995. It promised Write
Once, Run Anywhere (WORA), providing no-cost run-times on popular platforms.

On 13 November, 2006, Sun released much of Java as free and open source software
under the terms of the GNU General Public License (GPL).

On 8 May, 2007, Sun finished the process, making all of Java's core code free and
opensource, aside from a small portion of code to which Sun did not hold the
copyright.
Components of Java Programming Language?

A Java Programmer writes a program in a human-readable language called Source


Code. Therefore, the CPU or Chips never understand the source code written in any
programming language. These chips understand only one thing, which is called
machine language or code.
The machine understands this source code and translates them into machine
understandable code, which is an executable code.

To use Java, a developer needs to understand two things:


1. Java language and APIs
This is the front-end communication between the developer and the Java platform.

2. Java Virtual Machine


This is the back-end communication between the Java platform and the underlying
hardware. Let’s look at each of these in detail below.
Relationship between JVM, JRE, and JDK
Java JDK, JRE and JVM
What is JVM?
JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a
Java program.

When you run the Java program, Java compiler first compiles your Java code to
bytecode. Then, the JVM translates bytecode into native machine code (set of
instructions that a computer's CPU executes directly).
Java JDK, JRE and JVM
What is JRE?
JRE (Java Runtime Environment) is a software package that provides Java class
libraries, Java Virtual Machine (JVM), and other components that are required to run
Java applications.

JRE is the superset of JVM.


Java JDK, JRE and JVM
What is JDK?
JDK (Java Development Kit) is a software development kit required to develop
applications in Java. When you download JDK, JRE is also downloaded with it.

In addition to JRE, JDK also contains a number of development tools (compilers,


JavaDoc, Java Debugger, etc).
Different Types of Java Platform?

1. Java Platform, Standard Edition (Java SE): Java SE’s API offers the Java
programming language’s core functionality. It defines all the basis of type and object
to high-level classes. It is used for networking, security, database access, graphical
user interface (GUI) development, and XML parsing.

2. Java Platform, Enterprise Edition (Java EE): The Java EE platform offers an API and
runtime environment for developing and running highly scalable, large-scale, multi-
tiered, reliable, and secure network applications.

3. Java Programming Language Platform, Micro Edition (Java ME): The Java ME
platform offers an API and a small-footprint virtual machine running Java programming
language applications on small devices, like mobile phones.

4. Java FX: JavaFX is a platform for developing rich internet applications using a
lightweight user-interface API.
Features of Java?
The Java Features given below are simple and easy to understand.
1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Architecture neutral
8. Dynamic
9. Interpreted
10. High Performance
11. Multithreaded
12. Distributed
Features of Java?

Simple: Java is a simple language that can be learned easily even if you have just
started programming. It was designed to be easy to learn and use effectively.

Object Oriented: In Java, everything is an Object. Java supports various features of


an object-oriented language, such as abstraction, encapsulation, inheritance and
polymorphism.

Portable: Java enables the creation of a program that runs on any platform without
changing the source code of the program. i.e. Java creates a cross-platform programs
by compiling the programs into an intermediate representation called Java Bytecode.

Bytecode is the result of compiling a Java program. You can execute the code on any
platform. Converting a Java program into Bytecode makes it portable because any
computer installed with the JVM for the platform on which it is running can interpret
the Bytecode.
Platform Independent: Unlike many other programming languages including C and
C++, when Java is compiled, it is not compiled into platform specific machine, rather into
platform independent byte code. This byte code is distributed over the web and
interpreted by the Virtual Machine (JVM) on whichever platform it is being run on.

Secure: With Java's secure feature it enables to develop virus-free, tamper-free


systems. Any changes in the Bytecode are flagged as errors and the program does not
execute. This ensures the security of the Java program over the Internet.
Architecture-neutral: Java compiler generates an architecture-neutral object file
format, which makes the compiled code executable on many processors, with the
presence of Java runtime system.

Robust: Java makes an effort to eliminate error prone situations by emphasizing mainly
on compile time error checking and runtime checking.

Multithreaded: With Java's multithreaded feature it is possible to write programs that


can perform many tasks simultaneously. This design feature allows the developers to
construct interactive applications that can run smoothly.

Interpreted: Java byte code is translated on the fly to native machine instructions and is
not stored anywhere. The development process is more rapid and analytical since the
linking is an incremental and light-weight process.

High Performance: With the use of Just-In-Time compilers, Java enables high
performance.

You might also like