0% found this document useful (0 votes)
15 views28 pages

Java Programming 2

Uploaded by

ortizchloe346
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
15 views28 pages

Java Programming 2

Uploaded by

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

JAVA PROGRAMMING

MS. ALGIN T. BAGIW


What is Java
• Java is a programming
language and a platform. Java is a
high level, robust, object-oriented and
secure programming language.
• Sun Microsystems
• James Gosling is known as the father
of Java
James
Gosling
The father of Java
Programming
PLATFORM
•Any hardware or software
environment in which a
program runs, is known as a
platform.
•Java is a platform
Java Example
Application
• Mobile
• Smart Card
• Robotics
• Games, etc.
Types of Java Applications
• 1) Standalone Application
• Standalone applications are also known
as desktop applications or window-
based applications. These are traditional
software that we need to install on every
machine. Examples of standalone
application are Media player, antivirus,
etc. AWT and Swing are used in Java for
creating standalone applications.
Types of Java Applications
• 2) Web Application
• An application that runs on the server
side and creates a dynamic page is
called a web application. Currently,
Servlet, JSP, Struts, Spring, Hibernate,
JSF, etc. technologies are used for
creating web applications in Java.
Types of Java Applications
• 3) Enterprise Application
• An application that is distributed in
nature, such as banking applications,
etc. is called an enterprise application. It
has advantages like high-level security,
load balancing, and clustering. In Java,
EJB is used for creating enterprise
applications.
Types of Java Applications

• 4) Mobile Application
• An application which is created
for mobile devices is called a
mobile application. Currently,
Android and Java ME are used
for creating mobile applications.
Java Platforms / Editions
1) Java SE (Java Standard Edition)
• It is a Java programming platform. It
includes Java programming APIs such as
java.lang, java.io, java.net, java.util,
java.sql, java.math etc. It includes core
topics like OOPs, String, Regex,
Exception, Inner classes, Multithreading,
I/O Stream, Networking, AWT, Swing,
Reflection, Collection, etc.
Java Platforms / Editions
• 2) Java EE (Java Enterprise
Edition)
• It is an enterprise platform that is
mainly used to develop web and
enterprise applications. It is built on
top of the Java SE platform. It
includes topics like Servlet, JSP,
Web Services, EJB, JPA, etc.
Java Platforms / Editions

• 3) Java ME (Java Micro Edition)


• It is a micro platform that is
dedicated to mobile applications.
• 4) JavaFX
• It is used to develop rich internet
applications. It uses a lightweight user
interface API.
Prerequisite
• To learn Java, you must have the
basic knowledge of C/C++
programming language.
HISTORY OF JAVA
• Sun Microsystems
• Java was originally designed for interactive
television, but it was too advanced technology for
the digital cable television industry at the time.
• However, it was best suited for internet programming
• The principles for creating Java programming were
"Simple, Robust, Portable, Platform-independent,
Secured, High Performance, Multithreaded,
Architecture Neutral, Object-Oriented, Interpreted,
and Dynamic".
Following are given significant points
that describe the history of Java.
• 1) James Gosling, Mike Sheridan, and Patrick
Naughton initiated the Java language project in
June 1991. The small team of sun engineers
called Green Team.
• 2) Initially it was designed for small,
embedded systems in electronic appliances like
set-top boxes.
• 3) Firstly, it was called "Greentalk" by James
Gosling, and the file extension was .gt.
• 4) After that, it was called Oak and was
developed as a part of the Green project.
• 5) Why Oak? Oak is a symbol of
strength and chosen as a national tree of
many countries like the U.S.A., France,
Germany, Romania, etc.
• 6) In 1995, Oak was renamed as "Java“
because Oak was already a trademark
by Oak Technologies.
• 7) Why had they chose the name Java for Java
language? The team gathered to choose a new
name. The suggested words were "dynamic",
"revolutionary", "Silk", "jolt", "DNA", etc. They
wanted something that reflected the essence
of the technology: revolutionary, dynamic,
lively, cool, unique, and easy to spell, and fun
to say.
• According to James Gosling, "Java was one of
the top choices along with Silk". Since Java
was so unique, most of the team members
preferred Java than other names.
• 8) Java is an island in Indonesia where the
first coffee was produced (called Java
coffee). It is a kind of espresso bean. Java
name was chosen by James Gosling while
having a cup of coffee nearby his office.
• 9) Notice that Java is just a name, not an
acronym.
• 10) Initially developed by James Gosling at
Sun Microsystems (which is now a subsidiary
of Oracle Corporation) and released in 1995.
• 11) In 1995, Time magazine called Java
one of the Ten Best Products of 1995.
• 12) JDK 1.0 was released on January 23,
1996. After the first release of Java, there
have been many additional features added
to the language. Now Java is being used in
Windows applications, Web applications,
enterprise applications, mobile
applications, cards, etc. Each new version
adds new features in Java.
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 computers or chips understand only one
thing, which is called machine language or code.
These machine codes run at the CPU level.
• programming is all about the source code. The
machine understands this source code and
translates them into machine understandable
code, which is an executable code.
Java Development kit (JDK)
• JDK is a software development
environment used for making applets
and Java applications.
• JDK helps them to code and run Java
programs.
Why use JDK?
• JDK contains tools required to write Java
programs and JRE to execute them.
• It includes a compiler, Java application launcher,
Appletviewer, etc.
• Compiler converts code written in Java into byte
code.
• Java application launcher opens a JRE, loads the
necessary class, and executes its main method.
Java Virtual Machine (JVM):
• Java Virtual Machine (JVM) is an engine that
provides a runtime environment to drive the Java
Code or applications. It converts Java bytecode
into machine language. JVM is a part of the Java
Run Environment (JRE).
• In other programming languages, the compiler
produces machine code for a particular system.
However, the Java compiler produces code for a
Virtual Machine known as Java Virtual Machine.
Why JVM?
• JVM provides a platform-independent way of executing
Java source code.
• It has numerous libraries, tools, and frameworks.
• Once you run a Java program, you can run on any
platform and save lots of time.
• JVM comes with JIT (Just-in-Time) compiler that converts
Java source code into low-level machine language.
Hence, it runs faster than a regular application.
Java Runtime Environment (JRE)
• JRE is a piece of software that is
designed to run other software. It
contains the class libraries, loader class,
and JVM. In simple terms, if you want to
run a Java program, you need JRE.
Why use JRE?
• JRE contains class libraries, JVM, and other
supporting files. It does not include any tool
for Java development like a debugger,
compiler, etc.
• It uses important package classes like math,
swing, util, lang, awt, and runtime libraries.
• If you have to run Java applets, then JRE must
be installed in your system.

You might also like