Unit 1 Session 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

UNIT 1

INTRODUCTION TO JAVA S 1SSION 1

SESSION 1: OVERVIEW OF JAVA

Welcome to the first session of this first unit of this Module,


Overview of Java. As you already know, Java is one of the most
popular programming languages in the world, and it is used in a wild range of
application from developing enterprise-level software to creating mobile
applications for android devices. In this session, you will gain a fundamental
understanding of Java, including its history, features, and supported platforms.
We trust that you are already eager to begin studying this fantastic
programming language.

Objectives
By the end of this session, you should be able to:
a. Provide the general overview of Java
b. Explain the unique features of Java
c. Provide Key software for developing and running java
d. State the importance of Java
e. Explain the three primary platforms of Java

Now read on…

1.1 What is Java?

Java is a high-level object-oriented computer programming language. We hope


that you can remember what a computer programming language is. Discuss
with colleagues about what the term "computer programming language" and
“computer programming paradigms” means. Java was first released in the
middle of the 1990s. Since then, it has become a very popular computer
programming language. It is platform independent for any system with a Java
Virtual Machine (JVM), which is one of the reasons it is so common. This
means that codes can be written and compiled once, yet can be executed a
number of times on different systems without any problem. Because of this,
Java is a great programming language for making apps that can run on many
different platforms, such as desktop computers, mobile devices, and systems
that are built into other systems.

Java is an object-oriented computer programming language that enables


developers to build complex software systems with modular, reusable codes.

3CoDEUCC/Bachelor of Science in Information Technology


UNIT 1 BASICS OF PROGRAMMING IN C++
SESSION 1
Java's codes are similar to that of C++, which makes it easy for people who
know C++ to learn Java.

It is an open-source computer programming language that is built and


maintained up by a large community of developers and there are a lot of third-
party libraries and frameworks that can be used to make programming easier
and faster.

1.2 History of Java


Java in history is a computer programming language that was developed by
James Gosling at Sun Microsystems in the mid-1990s. Sun Microsystems was
later bought by Oracle Corporation. In 1991, a project called "Oak," which was
designed for small electronic devices like set-top boxes and handheld devices,
was the primary step towards the development of Java. The Oak project got its
name from the oak tree near James’s office. It was later renamed to Green. In
1995, the language was renamed "Java" after the Indonesia java coffee and
made available to the public for use.
The computer programming language became very famous quickly because of
its unique features and ability to write codes once and run anywhere. This
means that Java code written on one platform can run on any other platform
that supports Java without any platform-specific changes. Because of this, Java
became popular among developers who wanted to write software that could
run on more than one operating systems.
Java has been used to develop a wide range of applications, such as desktop
apps, web apps, mobile apps, and programs that are built into other devices
(embedded systems). Java is widely used in business applications like
customer relationship management systems, corporate resource planning
systems, and supply chain management systems.
This computer programming language has been updated and improved many
times over the years and currently, Java 17 is the most recent version and it
was released in September 2021. Java is still a popular language among
developers since it is easy to use, adaptable, and portable.
There are three major editions of Java and Java Card technology. these are:
1. Java Standard Edition (Java SE): This is designed for developing
general-purpose desktop, web, and server applications.
2. Java Enterprise Edition (Java EE): This edition provides a standardized
and portable platform for developing enterprise applications. It
simplifies the development process by offering pre-built components
and APIs for common enterprise requirements.

4 CoDEUCC/Bachelor of Science in Information Technology


UNIT 1
INTRODUCTION TO JAVA S 1SSION 1

3. Java Micro Edition (Java ME): This offers a lightweight and scalable
platform for developing mobile and embedded applications. It enables
developers to build cross-platform applications that can run on a wide
range of mobile and embedded devices. However, this edition is of less
prominent these days.
4. Java Card Technology: This is a technology that allows the
development of secure applications for smart cards and other resource-
constrained devices.

1.3 Features of Java


Java is a high- level object-oriented computer programming language with
garbage collection designed to be simple, portable and secured in use. It main
features includes the following:

1. Platform independence: Java code can be run on any platform that


has a Java Virtual Machine (JVM) installed. This makes it very
portable and enables developers to write codes once and run it on
multiple systems.
2. Garbage collection: Java's memory is managed by automatic garbage
collection, so the programmer doesn't have to create and free memory
by hand. This makes it easy to program and less likely to make
mistakes.
3. Security: Java was designed with security in mind. It has features like
a sandbox model and automatic memory management to stop
common security problems like buffer overflows and null pointer
exceptions.
4. Multi-threading: Java offers multi-threading, which lets different
parts of the same program run at the same time on different threads.
This can help apps that need to do more than one thing at the same
time work better.
5. Rich APIs: Java has a lot of APIs (Application Programming
Interfaces) that can be used to do a wide range of things, from
input/output operations to network connection and more.
6. Robustness: Java is known for being robust, which means that it can
handle errors and exceptions in an efficient way. This makes it easier
to write applications that are reliable and can work even when
something goes wrong.

5CoDEUCC/Bachelor of Science in Information Technology


UNIT 1 BASICS OF PROGRAMMING IN C++
SESSION 1
7. Scalability: Java is good at handling large-scale applications, and it
provides mechanisms for expanding applications in both horizontal
and vertical directions.
8. Performance: Java is not usually thought of as the fastest
programming language, but it has good performance with features
like just-in-time (JIT) compilation and bytecode optimization.
9. Extensibility: There are a lot of third-party tools and frameworks for
Java that can be used to add new features to applications.
10. Portability: Because Java is platform-independent, it is easy to run
apps on different hardware and operating systems.
11. Interoperability: Java has ways to work with other languages, like the
Java Native Interface (JNI) or calling web services from outside Java.
12. Tooling: Java has a wide range of development tools, such as
integrated development environments (IDEs) like Eclipse and IntelliJ,
build tools like Maven and Gradle, and testing frameworks like JUnit.
Dear students, Kindly note that these features have helped make Java one
of the most popular computer languages in the world. Millions of
developers use Java to build a wide range of applications.
1.4 Key software for java programs development and
execution
To refresh ourselves, you will recall that all computer programs written in
high-level language must first be compiled to convert the set of human
readable instructions into machine readable codes. These executable codes are
run to process the output of the program. We saw this exercise countless
number of times in Programming and problem-solving analysis with C++
course. We identified the compiler which is used to convert human readable
codes to machine readable codes as part of an Integrated Development
Environment (IDE) software which is used to write, test, debug and compile
programs.
Dear Student, kindly note that this is slightly different in the case of
programming in Java. In java programming, the source codes written in a text
editor of an IDE is first compiled by the compiler of Java Development Kit
(JDK) through a prompt from an IDE. The compiler converts the source code
into bytecode which is also interpreted by the Java Virtual Machine (JVM) of
the Java Runtime Environment (JRE).
Dear Student, kindly note that the main key software needed to write and run
java programs are the IDE which contains the text editor and instructs the
compiler of JDK to convert the source codes to bytecode and the JVM which
interprets bytecode to the needed output and this is contained in the JRE

6 CoDEUCC/Bachelor of Science in Information Technology


UNIT 1
INTRODUCTION TO JAVA S 1SSION 1

software. Usually, Java IDE’s such as Eclipse, NetBeans and IntelliJ include
the JRE which contains the JVM as part of the IDE.

1.4.1 Java Development Kit (JDK)


Java Development Kit (JDK) is a software development kit that provides
developers the tools they need to develop, test, and launch Java applications.
The JDK includes a compiler, an interpreter, a documentation generator, and a
number of libraries and APIs.
The Java Development Kit (JDK) includes the Java Runtime Environment
(JRE), which is needed to run Java apps, as well as other tools used during
development, such as the Java Development Tools (JDT) and the Java
Debugger (JDB).

1.4.2 Java Virtual Machine (JVM)


The Java Virtual Machine (JVM) is an abstract machine that offers the runtime
environment in which Java bytecode can be executed. When you write code in
Java, it is converted into bytecode, which is a low-level form of the code that
can be run on any device that has a JVM installed.
This bytecode is interpreted by the JVM, which converts it into machine code
that underlying hardware can run.

1.4.3 Java Runtime Environment (JRE)


Java Runtime Environment (JRE) is a piece of software that gives Java
applications the tools they need to run. The Java Runtime Environment (JRE)
has the Java Virtual Machine (JVM), class libraries, and other files that help
Java programs work.
The JRE is needed to run any Java program or applet because it offers the
runtime environment that Java bytecode needs to run. When a Java application
is run, the JRE reads the bytecode and gives the application the resources it
needs to run properly, such as memory management and security.

1.4.4 Java IDE’s


Java Integrated Development Environments (IDEs) are pieces of software that
make it easy for developers to develop Java applications. Some famous Java
IDEs include:
Eclipse: Eclipse is a free, open-source IDE that is used a lot for developing
Java software. It comes with a powerful code editor, tools for debugging, and
the ability to work with a wide range of apps.

7CoDEUCC/Bachelor of Science in Information Technology


UNIT 1 BASICS OF PROGRAMMING IN C++
SESSION 1
NetBeans is another popular Java development IDE that is free and open
source. It has a code editor, a debugger, and support for a wide range of Java
tools and libraries.
IntelliJ IDEA: This is a paid IDE that is known for its strong tools for
analyzing code and refactoring it. It has a code editor, a debugger, and support
for a wide range of Java tools and libraries.
JDeveloper: This is an IDE for Java and other computer languages that was
made by Oracle. It has a code editor, a debugger, and support for a wide range
of Java tools and libraries.
BlueJ: BlueJ is an open-source IDE that is easy to use and is made for newbies.
It has a code editor that is easier to use, a debugger, and support for a large
number of Java tools and libraries.
Dear student, kindly note that there are so many other Java IDEs, each of its
own pros and cons, and the decision of IDE often comes down to personal
taste, the needs of the project, and the resources that are available.

Summary
This is an overview to the computer programming language Java. Java is a
high-level, object-oriented programming language that was first released in the
middle of the 1990s. Java works on any platform, and its codes only needs to
be written and compiled once and can then be run on many different platforms
without any problem. It is an open-source programming language that is built
and maintained by a large community of developers. There are a lot of third-
party libraries and frameworks that can be used to make programming easier
and faster. This computer programming language is often used to make
enterprise-level software and apps for mobile devices that run on Android.
Java has features like garbage collection, security, multi-threading, rich APIs,
robustness, scalability, speed, extensibility, portability, interoperability, and
freedom from the platform. Java is easy to learn for people who already know
C++. It is also flexible and can be used anywhere. The most current version is
17, which came out in September 2021.

8 CoDEUCC/Bachelor of Science in Information Technology


UNIT 1
INTRODUCTION TO JAVA S 1SSION 1

Self-Assessment Questions

Exercise 1.1
What are some of the key features of Java, and how do they contribute to its
popularity among developers? Provide at least three examples.

9CoDEUCC/Bachelor of Science in Information Technology


UNIT 1 BASICS OF PROGRAMMING IN C++
SESSION 1

This is a blank sheet for your short notes on:


 issues that are not clear; and
 difficulty topics, if any

10 CoDEUCC/Bachelor of Science in Information Technology


UNIT 1
INTRODUCTION TO JAVA S 1SSION 1

CoDEUCC/Bachelor of Science in Information Technology


11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy