KEMBAR78
JAVA Week1 | PDF | Java (Programming Language) | Java (Software Platform)
0% found this document useful (0 votes)
5 views7 pages

JAVA Week1

This learning guide covers Java fundamentals, including its terminology, applications, and features. It emphasizes Java as an object-oriented programming language and provides insights into the Java Development Kit (JDK), Java Runtime Environment (JRE), and various types of Java applications. The guide also outlines key features of Java, such as its simplicity, portability, security, and robustness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

JAVA Week1

This learning guide covers Java fundamentals, including its terminology, applications, and features. It emphasizes Java as an object-oriented programming language and provides insights into the Java Development Kit (JDK), Java Runtime Environment (JRE), and various types of Java applications. The guide also outlines key features of Java, such as its simplicity, portability, security, and robustness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

0

LEARNING GUIDE

Week No.: __1__

TOPIC/S

Java Fundamentals: Java Terminologies, Applications and Features

EXPECTED COMPETENCIES

Upon completing this Learning Module, you will be able to:


1. Understand Java as an Object Oriented Programming language (OOP)
2. Know the Fundamentals, Application and Features of Java Programming
Language
3. Experience and Familiarize the Installation of Java Development Kit (JDK)
and Java IDE

CONTENT/TECHNICAL INFORMATION

What is Java

Java is an object-oriented, class-based, concurrent, secured and general-purpose


computer-programming language. It is a widely used robust technology.

Java is a programming language and a platform. Java is a high level, robust, object-
oriented and secure programming language.

Platform: Any hardware or software environment in which a program runs, is known


as a platform. Since Java has a runtime environment (JRE) and API, it is called a
platform.

Introduction to Java programming

 JAVA was developed by Sun Microsystems Inc in 1991, later acquired by


Oracle Corporation.
 It was developed by James Gosling and Patrick Naughton.
 James Gosling is known as the father of Java. Before Java, its name
was Oak. Since Oak was already a registered company, so James Gosling and
his team changed the Oak name to Java.
 It is a simple programming language. Writing, compiling and debugging a
program is easy in java.
 It helps to create modular programs and reusable code.

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
1

Java terminology

Java Virtual Machine (JVM)


The primary function of JVM is to execute the bytecode produced by compiler. Each
operating system has different JVM, however the output they produce after
execution of bytecode is same across all operating systems. That is why we call
java as platform independent language.

Java Virtual Machine ensures that the same Java code can be run on different
operating systems and platforms. Sun Microsystems’ slogan for Java was “write once,
run everywhere”.

Note. Figure of Java Virtual Machines

Bytecode
Java bytecode is the machine code in the form of a .class file. A bytecode in Java is
the instruction set for Java Virtual Machine and acts similar to an assembler.

Java Program Compile and Execution Flow

Note. Flow of Java Program

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
2

When a Java program is executed, the compiler compiles that piece of code and a
Bytecode is generated for each method in that program in the form of a .class file.

This bytecode can run on any other platform as well. But the bytecode is a non-
runnable code that requires or relies on an interpreter. This is where JVM plays an
important part.

Java Development Kit (JDK)

The JDK is a key platform component for building Java applications. At its heart is
the Java compiler
Complete java development kit includes JRE (Java Runtime Environment), compilers
and various tools like JavaDoc, Java debugger etc. In order to create, compile and run
Java program you would need JDK installed on your computer.
The figure below shows how the JDK fits the Java application development lifecycle.

Note. High level view of the JDK

Java Runtime Environment(JRE)


The Java Runtime Environment is the on-disk program that loads Java applications
for the JVM to execute. A JRE is included by default when you download the Java
Development Kit, and each JRE includes the core Java class libraries, a Java class
loader, and a Java Virtual Machine.

Note. A layered architectural view shows that the JRE contains the JVM, class loader,
and Java class libraries

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
3

Java Applications

According to Sun, 3 billion devices run Java. There are many devices where Java is
currently used. Some of them are as follows:

1. Desktop Applications such as acrobat reader, media player, antivirus, etc.


2. Web Applications such as irctc.co.in, javatpoint.com, etc.
3. Enterprise Applications such as banking applications.
4. Mobile
5. Embedded System
6. Smart Card
7. Robotics
8. Games, etc.

Types of Java Applications

There are mainly 4 types of applications that can be created using Java programming:

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.

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.

3) Enterprise Application

An application that is distributed in nature, such as banking applications, etc. is called


enterprise application. It has advantages of the high-level security, load balancing, and
clustering. In Java, EJB is used for creating enterprise 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.

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
4

Java Platforms / Editions

There are 4 platforms or editions of Java:

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.

2) Java EE (Java Enterprise Edition)

It is an enterprise platform which is mainly used to develop web and enterprise


applications. It is built on the top of the Java SE platform. It includes topics like
Servlet, JSP, Web Services, EJB, JPA, etc.

3) Java ME (Java Micro Edition)

It is a micro platform which is mainly used to develop mobile applications.

4) JavaFX

It is used to develop rich internet applications. It uses a light-weight user interface


API.

Features of Java

The primary objective of Java programming language creation was to make it


portable, simple and secure programming language. Apart from this, there are also
some excellent features which play an important role in the popularity of this
language. The features of Java are also known as java buzzwords.

A list of most important features of Java language is given below.

1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Interpreted
8. High Performance
9. Distributed

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
5

Simple

Java is very easy to learn, and its syntax is simple, clean and easy to understand.

Object-oriented

Java is an object-oriented programming language. Everything in Java is an object.

Platform Independent

Java is platform independent because it is different from other languages like C, C++,
etc. which are compiled into platform specific machines while Java is a write once,
run anywhere language. Java code can be run on multiple platforms, for example,
Windows, Linux, Sun Solaris, Mac/OS, etc.

Secured

Java is best known for its security. Java applications are more secured because it uses
its own Runtime Environment (JRE) while others uses Runtime Environment of the
Operating System (OS)

Robust

Robust simply means strong. Java is robust because:

o It uses strong memory management.


o There is a lack of pointers that avoids security problems.
o There is automatic garbage collection in java which runs on the Java Virtual
Machine to get rid of objects which are not being used by a Java application
anymore.
o There are exception handling and the type checking mechanism in Java. All these
points make Java robust.

Portable

Java is portable because it facilitates you to carry the Java bytecode to any platform. It
doesn't require any implementation.

High-performance

Java is faster than other traditional interpreted programming languages because Java
bytecode is "close" to native code. It is still a little bit slower than a compiled
language (e.g., C++). Java is an interpreted language that is why it is slower than
compiled languages, e.g., C, C++, etc.

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.
6

Distributed

Java is distributed because it facilitates users to create distributed applications in Java.

Activity:

1. Installation of Java Development Kit and Eclipse application (Java IDE)


2. Familiarization of Different parts of Eclipse Java Interface
3. Write a “Hello World” program

This module is a property of Technological University of the Philippines Visayas and intended
for EDUCATIONAL PURPOSES ONLY and is NOT FOR SALE NOR FOR REPRODUCTION.

You might also like