Java Ppt Divyangna
description
Transcript of Java Ppt Divyangna
![Page 1: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/1.jpg)
Presentation On JAVA
![Page 2: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/2.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/3.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/4.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/5.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/6.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/7.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/8.jpg)
Uses of Server Side Programming
• Process user input.• Display pages.• Structure web applications.• Interact with permanent storage (SQL, files)
![Page 9: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/9.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/10.jpg)
Diagram showing a website working
![Page 11: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/11.jpg)
Main Concept of OOPs Model
• Objects
• Classification
• Generalization and Inheritance
• Data Encapsulation
• Polymorphism
![Page 12: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/12.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/13.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/14.jpg)
Generalization
• Process of abstraction.
• Inheritance is a means of implementing Generalization.
![Page 15: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/15.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/16.jpg)
Encapsulation
• It deals with the prevention of accidental and unintentional corruption of data by the programmer.
![Page 17: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/17.jpg)
Original design goals
• Simple • Object-oriented (inheritance, polymorphism)• Distributed • Interpreted• multithreaded• Robust• Secure• Architecture-neutral
![Page 18: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/18.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/19.jpg)
Features of Java
• Platform Independency
• Security
![Page 20: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/20.jpg)
Understanding Java Platform Independency
• Independency of Compilation
• Independency of execution
• Independency of resources
![Page 21: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/21.jpg)
Execution Model Of Java
![Page 22: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/22.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/23.jpg)
Difference Between Both Compilations
![Page 24: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/24.jpg)
Java Criteria for Resources
![Page 25: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/25.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/26.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/27.jpg)
Secure Execution Model of java
![Page 28: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/28.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/29.jpg)
JVM(Java Virtual Machine)
![Page 30: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/30.jpg)
JRE(Java Runtime Environment)
![Page 31: Java Ppt Divyangna](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/31.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012917/5695cff91a28ab9b02905c04/html5/thumbnails/32.jpg)
.
.