topic 1 part1
TRANSCRIPT
-
7/30/2019 Topic 1 Part1
1/21
INTRODUCTION TO JAVA
PROGRAMMINGFAIROSE BINTI MOHTARInformation Technology in Information System (Bsc. Hons), UUM
JABATAN TEKNOLOGI MAKLUMAT & KOMUNIKASI
POLITEKNIK MUKAH SARAWAK
-
7/30/2019 Topic 1 Part1
2/21
LEARNING OUTCOMES :
Upon completion of this course, the students should be able to:
1. Describe the features and basic concepts of Java language.
2. Write, compile Java source code and interpret Java byte code using Java
Development Kit (JDK).
3. Implement the key of OOP concepts: classes and objects, inheritance and
polymorphism.
4. Incorporate exception handling in Java Programming.
-
7/30/2019 Topic 1 Part1
3/21
OBJECTIVE :
Understand Java Terminology And Environment :1. Describe the evolution and architecture of Java
2. Describe the basic concepts of object oriented programming
3. Explain the features of Java
4. List the differences between C++ and Java
5. Describe the types of Java programs
6. Describe the tools available in Java Developer Kit
7. Write a simple Java program
-
7/30/2019 Topic 1 Part1
4/21
Review : Features of OOP
DataAbstraction - Refers to the concept ofrepresenting only the essential features of a data
without including the non-essential details.
Encapsulation - Refers to the mechanism of
wrapping up of data and methods (that operate onthe data) into a single unit (class).
Inheritance - Refers to the concept by which oneclass derives the properties of another class.
Polymorphism - Refers to the response (output)of each object differently for the same input.
-
7/30/2019 Topic 1 Part1
5/21
Introduction
Is a object oriented programming (OOP) language.
Is simple and easy to understand.
Runs on a wide variety of operating environments.
Is a powerful and popular language to developInternet applications.
-
7/30/2019 Topic 1 Part1
6/21
Java Evolution
Year History
1990 C++ was found not fit to control electronic
devices. So research for a new
programming language started.1991-92 A new programming language OAK was
found. Later renamed as JAVA.
1993-94 Java became a perfect language to
develop Internet-based applications
1995 Sun Microsystems introduced Java-
enabled Web browser Hot Java.
-
7/30/2019 Topic 1 Part1
7/21
Java Architecture
Java is platform-independent as it can run ona wide variety of computers using differentOS.
There are four important components in Java
architecture: Java Source Code
Java Compiler
Java Byte code (Object code)
Java Virtual Machine (JVM)
-
7/30/2019 Topic 1 Part1
8/21
Java Architecture - Components
The components can be explained asfollows:
Java Source Code - Program written in the formof text using Java.
Java Compiler - Used to convert source codeinto binary program that consists of byte code. Itcreates .class file.
Java Byte Code (Object code) - Byte code is a
set of instructions that are machine-independent.Executed by JVM.
Java Virtual Machine (JVM) - Is a Java runtimesystem. Converts the bytecode in .class file to
machine language.
-
7/30/2019 Topic 1 Part1
9/21
Java Minimum Specifications and
Platform
Standard Edition SDK Components : OS running on the SPARC chip (32 bit and 64 bit) as well as :
Solaris OS
Linux
Microsoft Windows
The Java Platform, Standard Edition SDK includes the following :
Java Virtual Machine for the platform you choose Java class libraries for the platform you choose
Java compiler
Java class library (API) documentation (as a separate download)
Additional utilities, such as utilities for creating Java archive files (JAR files) and
for debugging Java technology programs
Examples of Java technology programs.
-
7/30/2019 Topic 1 Part1
10/21
Features in Java
-
7/30/2019 Topic 1 Part1
11/21
Features in Java
Simple - Java is easy to learn and use. Object-Oriented - This approach to design
programs very close to the real world.
Platform-Independent - Java programs written inone environment can run on all other environments.
Portable - Feature of bytecode and basic data typesin Java makes it compatible with all systems.
-
7/30/2019 Topic 1 Part1
12/21
Features in Java
Distributed -Java is powerful language to shareand access data across the net.
Robust -Java programs are reliable. Earlychecking and dynamic checking during runtime,
mostly eliminates situations that cause errors.
Secure -Java is a highly secure programminglanguage.
Multi-threaded - This concept enables Javaprograms to handle many tasks simultaneously.
-
7/30/2019 Topic 1 Part1
13/21
C++ VS Java
Compilation model of C++ and Java
-
7/30/2019 Topic 1 Part1
14/21
C++ VS Java
C++ Java
Supports ASCII char set. Supports Unicode char set.
Supports pointers, structures,
complex functions concepts.
Does not support pointers,
structures and complex
functions concepts.
Supports multiple inheritance. Does not support multipleinheritance. It can be
supported through
interface feature.
-
7/30/2019 Topic 1 Part1
15/21
Tools in Java Development Kit (JDK)
The tools available in Java Development Kit(JDK) are:
Compiler - javac is the Java compiler. It converts
the source code to .class file with bytecode. Interpreter - Java interpreter java is used to
translate the bytecode to machine language code.
AppletViewer - It is a tool used to view theapplet programs created in Java.
-
7/30/2019 Topic 1 Part1
16/21
-
7/30/2019 Topic 1 Part1
17/21
Types of Java Program
The two types of Java programs are: Application Programs
Application programs are the stand-alone programs, which can
execute from the command prompt.
Applet Programs
Applet programs are the Internet based programs, which can
run in a Web-browser.
-
7/30/2019 Topic 1 Part1
18/21
Summary
In this presentation, you learnt the following:1. Java is a object oriented programming (OOP)
language.
2. Java is found to be powerful for Internetapplications.
3. Java is platform-independent as it can run on widevariety of computers using different OS.
4. Java compiler, javacconverts source code of Javato the .class file with byte code.
5. Java Virtual Machine (JVM) is Java runtimeenvironment that converts bytecode to machinelanguage.
-
7/30/2019 Topic 1 Part1
19/21
Summary
In this presentation, you learnt the following:6. The two types of Java program are Application and
Applets.
7. The JDK tools are Compiler, Interpreter and AppletViewer.
-
7/30/2019 Topic 1 Part1
20/21
Review :
1. What is Java Virtual Machine?2. What are the tools available in Java Developers
Kit.
-
7/30/2019 Topic 1 Part1
21/21
Jigsaw Method Activity
Divide into a small group (4 person) Each group have a leader
Read these sub-topic :
Java Architecture
Features in Java C++ vs Java
Java Tools