Java Ppt Divyangna

Preview:

DESCRIPTION

Presentation on java

Citation preview

Presentation On JAVA

Evolution of Java

• Java - The new programming language developed by Sun Microsystems in 1991.

• Originally called Oak by James Gosling, one of the inventors of the Java Language.

• Java -The name that survived a patent search• Java Authors: James , Arthur Van , and others • Java is really “C++ -- ++

JAVA

• Is an Object Oriented Programming Language.

• It Introduced the concept of client side programming.

• It is also famous for Server side programming.

Client Side Programming

• Much like the server-side, Client-side programming is the name for all of the programs which are run on the Client.

Uses of Client Side Programming

•Make interactive webpages.•Make stuff happen dynamically on the web page.•Interact with temporary storage, and local storage (Cookies, local Storage).•Send requests to the server, and retrieve data from it.

•Provide a remote service for client-side applications, such as software registration, content delivery, or remote multi-

player gaming.

Example languages

• JavaScript (primarily)• HTML*• CSS*• Any language running on a client device that

interacts with a remote service is a client-side language like servlets, jsp( Java Server Pages).

• *HTML and CSS aren't really "programming languages" per-se. They are markup

syntax by which the Client renders the page for the User

Server Side Programming

• Server-side programming, is the general name for the kinds of programs which are run on the Server.

Uses of Server Side Programming

• Process user input.• Display pages.• Structure web applications.• Interact with permanent storage (SQL, files)

Example Languages

• PHP

• ASP .Net in C#, C++, or Visual Basic.

• Nearly any language (C++, C#, Java). These were not designed specifically for the task, but are now often used for application-level web services.

• Client-side programming

Diagram showing a website working

Main Concept of OOPs Model

• Objects

• Classification

• Generalization and Inheritance

• Data Encapsulation

• Polymorphism

Object

• An Object is a discrete entity which has well defined behavior.

• Concept of Object simplifies understanding and communication of problem by shifting the focus from the task to the performer.

Classification

• Process of grouping objects having common attributes and behavior into logical units called classes.

• Concept of classification simplifies object management.

Generalization

• Process of abstraction.

• Inheritance is a means of implementing Generalization.

Polymorphism

• It states that behavior can have multiple manifestations.

• We can have multiple methods of same name performing a task of different ways.

Encapsulation

• It deals with the prevention of accidental and unintentional corruption of data by the programmer.

Original design goals

• Simple • Object-oriented (inheritance, polymorphism)• Distributed • Interpreted• multithreaded• Robust• Secure• Architecture-neutral

Java Attributes

• Familiar, Simple, Small• Compiled and Interpreted• Platform-Independent and Portable• Object-Oriented • Robust and Secure• Distributed• Multithreaded and Interactive• High Performance• Dynamic and Extensible

Features of Java

• Platform Independency

• Security

Understanding Java Platform Independency

• Independency of Compilation

• Independency of execution

• Independency of resources

Execution Model Of Java

Java is Compiled and Interpreted

• .

Text Editor Compiler Interpreter

Programmer

Source Code

.java file

Byte Code

.class file

Hardware and Operating System

Notepad, emacs, vi

javac

javaappletviewernetscape

Difference Between Both Compilations

Java Criteria for Resources

Platform Independency

JAVA COMPILERJAVA COMPILER

JAVA BYTE CODEJAVA BYTE CODE

JAVA INTERPRETERJAVA INTERPRETER

(translator)

(same for all platforms)

(one for each different system)

Portability

• Critical concern: write once-run everywhere• Consequences:

– Portable interpreter– definition through virtual machine: the JVM– run-time representation has high-level semantics– supports dynamic loading– (+) high-level representation can be queried at run-time to

provide reflection– (-) Dynamic features make it hard to fully compile, safety

requires numerous run-time checks

Secure Execution Model of java

How is Java different from Other language

• Less than you think:– Java is an imperative language (like C++, Ada, C, Pascal)– Java is interpreted (like LISP, APL)– Java is garbage-collected (like LISP, Eiffel, Modula-3)– Java can be compiled (like LISP)– Java is object-oriented (like C++, Ada, Eiffel)

• A successful hybrid for a specific-application domain• A reasonable general-purpose language for non-real-

time applications• Work in progress: language evolving rapidly

JVM(Java Virtual Machine)

JRE(Java Runtime Environment)

Java better than C++ ?

• No Typedefs, Defines, or Preprocessor• No Global Variables• No Goto statements• No Pointers• No Unsafe Structures• No Multiple Inheritance• No Operator Overloading• No Automatic Coercions• No Fragile Data Types

.

.