0% found this document useful (0 votes)
9 views16 pages

Lecture 1

Uploaded by

addis bekele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views16 pages

Lecture 1

Uploaded by

addis bekele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

JAVA PROGRAMMING

HISTORY, JAVA FEATURES, OOP CONCEPTS

MCA I Sem II

Faculty: Mrs. A. Thomas


Introduction
 Java is a simple and yet powerful object oriented
programming language and it is in many respects
similar to C++.
 Java originated at Sun Microsystems, Inc. in
1991. It was conceived by James Gosling, Patrick
Naughton, Chris Warth, Ed Frank, and Mike
Sheridan at Sun Microsystems, Inc. It was
developed to provide a platform-independent
programming language

2
Object Oriented Programming

 Object Oriented Programming is a method of


implementation in which programs are organized
as cooperative collection of objects, each of which
represents an instance of a class, and whose
classes are all members of a hierarchy of classes
united via inheritance relationships.

3
Object Oriented Programming Concepts

 Abstraction

 Encapsulation

 Inheritance

 Polymorphism

4
Class vs Object

Class Object
A piece of the program’s An entity in a running
source code program
Written by a Created when the
programmer program is running (by
the main method or a
constructor or another
method)

5
Class vs Object

Class Object
Specifies the structure Holds specific values of
(the number and types) attributes; these values
of its objects’ attributes can change while the
— the same for all of its program is running
objects

Specifies the possible Behaves appropriately


behaviors of its objects when called upon
6
Object Oriented Features of Java
 Reusability of Code

 Emphasis on data rather than procedure


 Data is hidden and cannot be accessed by external
functions
 Objects can communicate with each other through
functions
 New data and functions can be easily added

7
Java Buzzwords

 Simple

 Primary characteristics of the Java programming language include a


simple language that can be programmed without extensive programmer
training while being attuned to current software practices. The
fundamental concepts of Java technology are grasped quickly;
programmers can be productive from the very beginning.

8
 Portable (Platform Independent)

 Java technology is designed to support applications that will be


deployed into heterogeneous network environments. In such
environments, applications must be capable of executing on a variety of
hardware architectures. Within this variety of hardware platforms,
applications must execute atop a variety of operating systems and
interoperate with multiple programming language interfaces. To
accommodate the diversity of operating environments, the Java
Compiler product generates bytecodes--an architecture neutral
intermediate format designed to transport code efficiently to multiple
hardware and software platforms.

9
 Robust

 The Java programming language is designed for creating highly reliable


software. It provides extensive compile-time checking, followed by a
second level of run-time checking. Language features guide
programmers towards reliable programming habits. The memory
management model is extremely simple: objects are created with a new
operator. There are no explicit programmer-defined pointer data types,
no pointer arithmetic, and automatic garbage collection. This simple
memory management model eliminates entire classes of programming
errors that bedevil C and C++ programmers. You can develop Java
code with confidence that the system will find many errors quickly and
that major problems won't lay dormant until after your production code
has shipped.

10
 Secure

 Java technology is designed to operate in distributed environments,


which means that security is of paramount importance. With security
features designed into the language and run-time system, Java
technology lets you construct applications that can't be invaded from
outside. In the network environment, applications written in the Java
programming language are secure from intrusion by unauthorized code
attempting to get behind the scenes and create viruses or invade file
systems.

11
 Dynamic

 While the Java Compiler is strict in its compile-time static


checking, the language and run-time system are dynamic in their linking
stages. Classes are linked only as needed. New code modules can be
linked in on demand from a variety of sources, even from sources
across a network. In the case of the HotJava Browser and similar
applications, interactive executable code can be loaded from anywhere,
which enables transparent updating of applications

12
 Threaded

 The Java platform supports multithreading at the language level with


the addition of sophisticated synchronization primitives: the language
library provides the Thread class, and the run-time system provides
monitor and condition lock primitives.

13
 Interpreted
 The Java interpreter can execute Java bytecodes directly on any
machine to which the interpreter and run-time system have been ported.
In an interpreted platform such as Java technology-based system,

14
Java Applications
 Java has evolved from a simple language providing
interactive dynamic content for web pages to a
predominant enterprise-enabled programming language
suitable for developing significant and critical
applications. Today, It is used for many types of
applications including Web based applications, Financial
applications, Gaming applications, embedded systems,
Distributed enterprise applications, mobile applications,
Image processors, desktop applications and many more.

15
END OF TOPIC

16

You might also like