32
Presentation On JAVA

Java Ppt Divyangna

Embed Size (px)

DESCRIPTION

Presentation on java

Citation preview

Page 1: Java Ppt Divyangna

Presentation On JAVA

Page 2: Java Ppt Divyangna

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++ -- ++

Page 3: Java Ppt Divyangna

JAVA

• Is an Object Oriented Programming Language.

• It Introduced the concept of client side programming.

• It is also famous for Server side programming.

Page 4: Java Ppt Divyangna

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.

Page 5: Java Ppt Divyangna

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.

Page 6: Java Ppt Divyangna

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

Page 7: Java Ppt Divyangna

Server Side Programming

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

Page 8: Java Ppt Divyangna

Uses of Server Side Programming

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

Page 9: Java Ppt Divyangna

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

Page 10: Java Ppt Divyangna

Diagram showing a website working

Page 11: Java Ppt Divyangna

Main Concept of OOPs Model

• Objects

• Classification

• Generalization and Inheritance

• Data Encapsulation

• Polymorphism

Page 12: Java Ppt Divyangna

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.

Page 13: Java Ppt Divyangna

Classification

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

• Concept of classification simplifies object management.

Page 14: Java Ppt Divyangna

Generalization

• Process of abstraction.

• Inheritance is a means of implementing Generalization.

Page 15: Java Ppt Divyangna

Polymorphism

• It states that behavior can have multiple manifestations.

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

Page 16: Java Ppt Divyangna

Encapsulation

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

Page 17: Java Ppt Divyangna

Original design goals

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

Page 18: Java Ppt Divyangna

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

Page 19: Java Ppt Divyangna

Features of Java

• Platform Independency

• Security

Page 20: Java Ppt Divyangna

Understanding Java Platform Independency

• Independency of Compilation

• Independency of execution

• Independency of resources

Page 21: Java Ppt Divyangna

Execution Model Of Java

Page 22: Java Ppt Divyangna

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

Page 23: Java Ppt Divyangna

Difference Between Both Compilations

Page 24: Java Ppt Divyangna

Java Criteria for Resources

Page 25: Java Ppt Divyangna

Platform Independency

JAVA COMPILERJAVA COMPILER

JAVA BYTE CODEJAVA BYTE CODE

JAVA INTERPRETERJAVA INTERPRETER

(translator)

(same for all platforms)

(one for each different system)

Page 26: Java Ppt Divyangna

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

Page 27: Java Ppt Divyangna

Secure Execution Model of java

Page 28: Java Ppt Divyangna

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

Page 29: Java Ppt Divyangna

JVM(Java Virtual Machine)

Page 30: Java Ppt Divyangna

JRE(Java Runtime Environment)

Page 31: Java Ppt Divyangna

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

Page 32: Java Ppt Divyangna

.

.