Nothing Special   »   [go: up one dir, main page]

Java Lesson 1 2 3 Lecture 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Introduction to Java and

Software Life Cycle

©https://blogs.ashrithgn.com/
Faculty of Computer Science
Objectives

• After you have read and studied this lecture, you should be able to
• introduce the java programming language characteristics

• explain the stages of the software lifecycle

Faculty of Computer Science


Develop and Run the Java Program

Faculty of Computer Science


JRE Vs. JDK

Faculty of Computer Science


Introduction to Java

• Object-Oriented Programming Language

• Platform Independence
MyProgram.java
• A platform is the hardware or software
API
environment in which a program runs. Java
Platform
Java Virtual Machine
• Microsoft Windows, Linux, Solaris OS, and Mac OS
Hardware-Based Platform
• The Java platform has two components:
• Java Virtual Machine (JVM)

• Java Application Programming Interface (API)

Faculty of Computer Science


History of Java

• Java was initially developed by James Gosling at Sun Microsystems.

• Firstly, it was called "Greentalk" ,the file extension was .gt.

• After that, it was called Oak.

• Sun released Oak as Java in 1995 after reworking it for the Web.

• The first stable version, JDK 1.0.2 was released on January, 1996.

• The latest release for the Java SE Platform is Java SE 15 in September 2020.

Faculty of Computer Science


Editions of Java

• J2SE (Java Platform, Standard Edition)


• mainly used to create Desktop applications.

• J2EE (Java Platform, Enterprise Edition)


• Distributed Enterprise applications

• create a special type of Server-side application known as a servlet


• Servlets can access enterprise databases and make that data available via the web.

• J2ME (Java Platform, Micro Edition)


• Embedded code for phones, set top boxes and other consumer devices

Faculty of Computer Science


Java Features

• Simple, Object-oriented and familiar

• Distributed

• Robust and Secure

• Architecture-neutral and Portable

• High Performance

• Multithreaded

• Dynamic

Faculty of Computer Science


Two kinds of Java Environment Programs

Scientific Application
 Applications
Enterprise Applications Desktop GUI Application
• Unrestricted access to system
resources Web Applications Using Java Embedded System Application
• Interface can be graphical,
Standalone Applications Mobile Applications
textual or neither
Web Servers & Application Servers

 Applets
• Restricted access to system resources
• Interface is embedded in some
graphical wrapper
• Browser
• Applet viewer

Faculty of Computer Science


Benefits of Java

• Get started quickly


• a powerful object-oriented language, it's easy to learn, especially for programmers already
familiar with C or C++

• Write less code


• a program written in the Java programming language can be four times smaller than the same
program written in C++

• Write better code


• encourages good coding practices, and automatic garbage collection helps you avoid memory leaks

• Develop programs more quickly


• Simpler than C++, and development time could be up to twice as fast when writing in it.

Faculty of Computer Science


Benefits of Java (cont’d)

• Avoid platform dependencies


• program is portable by avoiding the use of libraries written in other languages.

• Write once, run anywhere


• applications written in the Java programming language are compiled into machine
independent bytecodes, they run consistently on any Java platform

• Distribute software more easily


• With the java web start software, Java is easy to distribute.

Faculty of Computer Science


Difference Between C++ and Java

Parameter C++ Java


Platform C++ is platform dependent. Java is platform independent
Features C++ is not pure object-oriented features Java is an object- oriented features. It
supports automatic garbage collection.

Pointer C++ support pointers. Java offers only limited support for
pointers.

Performance C++ is faster than Java. Java is slower than C++.


Compiler and C++ only support compiler. Java supports both compiler and
Interpreter interpreter.
Concept Write once compile anywhere Write once run anywhere everywhere.

Faculty of Computer Science


Program Design

• Performance

• Maintainability

• Extensibility

• Availability

Faculty of Computer Science


Software Engineering

• The application of a systematic and disciplined approach to the development,


testing, and maintenance of a program.

• Software life cycle


• The sequence of stages from conception to operation of a program.

• Five stages are


• Analysis
• Design
• Coding
• Testing
• Operation and Maintenance

Faculty of Computer Science


Summary

• Java is object oriented programming language and platform independent.

• JVM and API are the main components of Java.

• The sequence of software development stages from conception to operation is called


the software life cycle.

• Five major phases of the software life cycle are analysis, design, coding, testing, and
operation.

• Software engineering is the application of a systematic and disciplined approach to the


development, testing, and maintenance of a program.

Faculty of Computer Science


Next Lecture

• Object Oriented Programming Concepts

Faculty of Computer Science

You might also like