logging in or signing up JavaEvoluation1 RithwikMannaraprayil Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 23 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 06, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Java and its Evolution: Java and its Evolution Tamilselvi.RContents: Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment Build your first Java Program Summary and ReferenceJava - An Introduction: Java - An Introduction Java - The new programming language developed by Sun Microsystems in 1 991. 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 Introduction: Java Introduction Originally created for consumer electronics (TV, VCR, Freeze, Washing Machine, Mobile Phone). Java - CPU Independent language Internet and Web was just emerging, so Sun turned it into a language of Internet Programming. It allows you to publish a webpage with Java code in it.Java Milestones: Java Milestones Year Development 1990 Sun decided to developed special software that could be used for electronic devices. A project called Green Project created and head by James Gosling. 1991 Explored possibility of using C++, with some updates announced a new language named “Oak” 1992 The team demonstrated the application of their new language to control a list of home appliances using a hand held device. 1993 The World Wide Web appeared on the Internet and transformed the text-based interface to a graphical rich environment. The team developed Web applets (time programs) that could run on all types of computers connected to the Internet.Java Milestones: Java Milestones Year Development 1994 The team developed a new Web browsed called “Hot Java” to locate and run Applets. HotJava gained instance success. 1995 Oak was renamed to Java, as it did not survive “legal” registration. Many companies such as Netscape and Microsoft announced their support for Java 1996 Java established itself it self as both 1. “the language for Internet programming” 2. a general purpose OO language.( SUN RELEASES JDK 1.0.) 1997- A class libraries, Community effort and standardization, Enterprise Java, Clustering, etc.. ( SUN RELEASES JDK 1.1)Java Milestones: Java Milestones Year Development 1998 SUN RELEASES JAVA 2 WITH VERSION OF SDK(SOFTWARE DEVELOPMENT KIT) 1999 SUN RELEASES JAVA 2 PLATFORM ,STANDARD EDITION(J2SE) AND ENTERPRISE EDITION(I2EE 2000 2002 J2SE WITH SDK 1.3 WAS RELEASED J2SE WITH SDK 1.4 WAS RELEASED 2004 J2SE WITH JDK 5.0 WAS RELEASED.IT IS KNOWN AS J2SE 5.0Sun white paper defines Java as:: Sun white paper defines Java as: Simple and Powerful Safe Object Oriented Robust Architecture Neutral and Portable Interpreted and High Performance Threaded DynamicJava Attributes: Java Attributes Familiar, Simple, Small Compiled and Interpreted Platform-Independent and Portable Object-Oriented Robust and Secure Distributed Multithreaded and Interactive – handling multiple task simultaneously. High Performance - use intermediate bytecode to reduce overheads during runtime Dynamic and Extensible - predefined class libraries,methods and object are linked dynamically @ run time.Java is Compiled and Interpreted: 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 NetBeans My eclipse javac java appletviewer netscapeTotal Platform Independence: Total Platform Independence JAVA COMPILER JAVA BYTE CODE JAVA INTERPRETER Windows 95 Macintosh Solaris Windows NT (translator) (same for all platforms) (one for each different system) Architecture Neutral & Portable: Architecture Neutral & Portable Java Compiler - Java source code (file with extension . java ) to bytecode ( file with extension .class ) Bytecode - an intermediate form, closer to machine representation A interpreter (virtual machine) on any target platform interprets the bytecode. Architecture Neutral & Portable: Architecture Neutral & Portable Porting the java system to any new platform involves writing an interpreter . The interpreter will figure out what the equivalent machine dependent code to runRich Class Environment: Rich Class Environment Core Classes language Utilities Input/Output Low-Level Networking Abstract Graphical User Interface Internet Classes TCP/IP Networking WWW and HTML Distributed ProgramsHow Does Java Compares to C++ and Other OO Languages: How Does Java Compares to C++ and Other OO LanguagesOverlap of C, C++, and Java: Overlap of C, C++, and Java C C++ JavaJava better than C++ ?: 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 Fragile Data Types ?Object Oriented Languages -A Comparison: Object Oriented Languages -A Comparison: Java Integrates Power of Compiled Languages and Flexibility of Interpreted LanguagesJava Applications: Java Applications We can develop two types of Java programs: Stand-alone applications Web applications (applets)Applications v/s Applets: Applications v/s Applets Different ways to run a Java executable are: Application - A stand-alone program that can be invoked from command line . A program that has a “ main ” method Applet - A program embedded in a web page , to be run when the page is browsed . A program that contains no “main” methodApplets v/s Applications: Applets v/s Applications Different ways to run a Java executable are Application - A stand-alone program that can be invoked from command line . A program that has a “ main ” method Applet - A program embedded in a web page , to be run when the page is browsed . A program that contains no “main” method Application –Executed by the Java interpreter. Applet - Java enabled web browser.Java and World Wide Web: Java and World Wide Web Turning the Web into an Interactive and Application Delivery PlatformWhat is World Wide Web ?: What is World Wide Web ? Web is an open-ended information retrieval system designed to be used in the Internet wide distributed system. It contains Web pages (created using HTML) that provide both information and controls. Unlike a menu driven system--where we are guided through a particular direction using a decision tree, the web system is open ended and we can navigate to a new document in any direction.Web Structure of Information Search/Navigation: Web Structure of Information Search/NavigationWeb as a delivery Vehicle: Web as a delivery VehicleExecution of Applets: Execution of Applets Hello Hello Java <app= “Hello”> 4 APPLET Development “hello.java” AT SUN.COM The Internet hello.class AT SUN’S WEB SERVER 2 3 1 5 Create Applet tag in HTML document Accessing from Unimelb.edu.au The browser creates a new window and a new thread and then runs the codeSignificance of downloading Applets: Significance of downloading Applets Interactive WWW Flashy animation instead of static web pages Applets react to users input and dynamically change Display of dynamic data WWW with Java - more than a document publishing medium http://www.javasoft.com/applets/alpha/applets/StockDemo/standalone.htmlPower of Java and the Web: Power of Java and the Web Deliver applications, not just information Eliminate porting Eliminate end-user installation Slash software distribution costs Reach millions of customers - instantlyJava Development Kit: Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecodes javaprof - Java profiler javadoc - documentation generator javah - creates C header filesJava Environment: Java EnvironmentJava Development Kit: Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecodes javaprof - Java profiler javadoc - documentation generator javah - creates C header filesProcess of Building and Running Java Programs: Process of Building and Running Java Programs Text Editor Java Source Code javac Java Class File java Outout javadoc javah jdb HTML Files Header FilesLet us Try Out: Let us Try Out Building your first Java ProgramHello Internet: Hello Internet // HelloInternet.java: Hello Internet program class HelloInternet { public static void main(String args[]) { System.out.println( “ Hello Internet ” ); } }Program Processing: Program Processing Compilation # javac HelloInternet .java results in HelloInternet.class Execution # java HelloInternet Hello InternetCONTINUED …..: CONTINUED ….. Main Line Public Static Void Main (String args[]) Main :- Starting Point For Interpreter To Begin The Execution Public :- Its An Access Specifier That States Main Method Is Unprotected. Static : -Declares This Method As One That Belongs To Entire Class Void :-Main Method Does Not Return Any Value. String args[] :- Contains An Array Of Objects Of Class Type String.Simple Java Applet: Simple Java Applet // HelloWorld.java import java.applet.Applet; import java.awt.*; public class HelloWorld extends Applet { public void paint(Graphics g) { g.drawString (“Hello World !”,25, 25); } }Calling an Applet: Calling an Applet <HTML> <TITLE>HELLO WORLD APPLET</TITLE> <body> <H1>THE HELLO WORLD APPLET<H1> <APPLET CODE=“HelloWorld.class” width=500 height=500> </APPLET> </body> </HTML>Applet Execution: Applet Execution Using AppletViewer Using BrowserJava Program Structure: 41 Java Program Structure Documentation Section Package Statement Import Statements Interface Statements Class Declarations Main Method Class { }More Java: Classes and static methods: 42 More Java: Classes and static methods // SquareRoot.java: compute square root of number import java.lang.Math; class SquareRoot { public static void main(String args []) { double x = 4; double y; y = Math.sqrt(x); System.out.println("y= "+y); } }Basic Data Types: 43 Basic Data Types Types boolean either true o r false char 16 bit Unicode 1.1 byte 8-bit integer short 16-bit integer int 32-bit integer long 64-bit integer float 32-bit floating point (IEEE 754-1985) double 64-bit floating point (IEEE 754-1985) String (class for manipulating strings)Variables: 44 Varia bles Local Variables are declared within the block of code Variable has a type preceding the name Initial value is set by initialization expressions. type variableName = initialValue; e.g. int x = 1 ; Variables can be defined just before their usage (unlike C) e.g., for( int i = 0; i < 10; i++)Declaring Constants - example : 45 Declaring Constants - example class CircleArea { public static void main(String args[]) { final double PI = 3.1428; double radius = 5.5; // in cms double area; area = PI * radius * radius; System.out.println("Circle Radius = "+radius+" Area="+area); } }Constants: 46 Constants Constants are similar to variables except that they hold a fixed value. They are also called “READ” only variables. Constants are declared with the reserved word “final”. final int MAX_LENGTH = 420; final double PI = 3.1428; By convention upper case letters are used for defining constants.Comments: 47 C omments English te xt scattered through the code are comments JAVA supports 3 types of comments /* */ - Usually used from multi-line comments // - Used for single line comments /** */ - Documentation commentsSummary: Summary Java has emerged as a general purpose OO language. It supports both stand alone and Internet Applications. Makes the Web Interactive and medium for application delivery. Provides an excellent set of Tools for Application Development. Java is ubiquitous!References: References Chapter 2: “Java Evolution”, Programming with Java by Balagurusamy, TMH, New Delhi, India Optional: Chapter 1: “Mastering C++” by V. Rajuk and R. Buyya, Tata McGraw Hill, New Delhi, India. You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
JavaEvoluation1 RithwikMannaraprayil Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 23 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 06, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Java and its Evolution: Java and its Evolution Tamilselvi.RContents: Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment Build your first Java Program Summary and ReferenceJava - An Introduction: Java - An Introduction Java - The new programming language developed by Sun Microsystems in 1 991. 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 Introduction: Java Introduction Originally created for consumer electronics (TV, VCR, Freeze, Washing Machine, Mobile Phone). Java - CPU Independent language Internet and Web was just emerging, so Sun turned it into a language of Internet Programming. It allows you to publish a webpage with Java code in it.Java Milestones: Java Milestones Year Development 1990 Sun decided to developed special software that could be used for electronic devices. A project called Green Project created and head by James Gosling. 1991 Explored possibility of using C++, with some updates announced a new language named “Oak” 1992 The team demonstrated the application of their new language to control a list of home appliances using a hand held device. 1993 The World Wide Web appeared on the Internet and transformed the text-based interface to a graphical rich environment. The team developed Web applets (time programs) that could run on all types of computers connected to the Internet.Java Milestones: Java Milestones Year Development 1994 The team developed a new Web browsed called “Hot Java” to locate and run Applets. HotJava gained instance success. 1995 Oak was renamed to Java, as it did not survive “legal” registration. Many companies such as Netscape and Microsoft announced their support for Java 1996 Java established itself it self as both 1. “the language for Internet programming” 2. a general purpose OO language.( SUN RELEASES JDK 1.0.) 1997- A class libraries, Community effort and standardization, Enterprise Java, Clustering, etc.. ( SUN RELEASES JDK 1.1)Java Milestones: Java Milestones Year Development 1998 SUN RELEASES JAVA 2 WITH VERSION OF SDK(SOFTWARE DEVELOPMENT KIT) 1999 SUN RELEASES JAVA 2 PLATFORM ,STANDARD EDITION(J2SE) AND ENTERPRISE EDITION(I2EE 2000 2002 J2SE WITH SDK 1.3 WAS RELEASED J2SE WITH SDK 1.4 WAS RELEASED 2004 J2SE WITH JDK 5.0 WAS RELEASED.IT IS KNOWN AS J2SE 5.0Sun white paper defines Java as:: Sun white paper defines Java as: Simple and Powerful Safe Object Oriented Robust Architecture Neutral and Portable Interpreted and High Performance Threaded DynamicJava Attributes: Java Attributes Familiar, Simple, Small Compiled and Interpreted Platform-Independent and Portable Object-Oriented Robust and Secure Distributed Multithreaded and Interactive – handling multiple task simultaneously. High Performance - use intermediate bytecode to reduce overheads during runtime Dynamic and Extensible - predefined class libraries,methods and object are linked dynamically @ run time.Java is Compiled and Interpreted: 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 NetBeans My eclipse javac java appletviewer netscapeTotal Platform Independence: Total Platform Independence JAVA COMPILER JAVA BYTE CODE JAVA INTERPRETER Windows 95 Macintosh Solaris Windows NT (translator) (same for all platforms) (one for each different system) Architecture Neutral & Portable: Architecture Neutral & Portable Java Compiler - Java source code (file with extension . java ) to bytecode ( file with extension .class ) Bytecode - an intermediate form, closer to machine representation A interpreter (virtual machine) on any target platform interprets the bytecode. Architecture Neutral & Portable: Architecture Neutral & Portable Porting the java system to any new platform involves writing an interpreter . The interpreter will figure out what the equivalent machine dependent code to runRich Class Environment: Rich Class Environment Core Classes language Utilities Input/Output Low-Level Networking Abstract Graphical User Interface Internet Classes TCP/IP Networking WWW and HTML Distributed ProgramsHow Does Java Compares to C++ and Other OO Languages: How Does Java Compares to C++ and Other OO LanguagesOverlap of C, C++, and Java: Overlap of C, C++, and Java C C++ JavaJava better than C++ ?: 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 Fragile Data Types ?Object Oriented Languages -A Comparison: Object Oriented Languages -A Comparison: Java Integrates Power of Compiled Languages and Flexibility of Interpreted LanguagesJava Applications: Java Applications We can develop two types of Java programs: Stand-alone applications Web applications (applets)Applications v/s Applets: Applications v/s Applets Different ways to run a Java executable are: Application - A stand-alone program that can be invoked from command line . A program that has a “ main ” method Applet - A program embedded in a web page , to be run when the page is browsed . A program that contains no “main” methodApplets v/s Applications: Applets v/s Applications Different ways to run a Java executable are Application - A stand-alone program that can be invoked from command line . A program that has a “ main ” method Applet - A program embedded in a web page , to be run when the page is browsed . A program that contains no “main” method Application –Executed by the Java interpreter. Applet - Java enabled web browser.Java and World Wide Web: Java and World Wide Web Turning the Web into an Interactive and Application Delivery PlatformWhat is World Wide Web ?: What is World Wide Web ? Web is an open-ended information retrieval system designed to be used in the Internet wide distributed system. It contains Web pages (created using HTML) that provide both information and controls. Unlike a menu driven system--where we are guided through a particular direction using a decision tree, the web system is open ended and we can navigate to a new document in any direction.Web Structure of Information Search/Navigation: Web Structure of Information Search/NavigationWeb as a delivery Vehicle: Web as a delivery VehicleExecution of Applets: Execution of Applets Hello Hello Java <app= “Hello”> 4 APPLET Development “hello.java” AT SUN.COM The Internet hello.class AT SUN’S WEB SERVER 2 3 1 5 Create Applet tag in HTML document Accessing from Unimelb.edu.au The browser creates a new window and a new thread and then runs the codeSignificance of downloading Applets: Significance of downloading Applets Interactive WWW Flashy animation instead of static web pages Applets react to users input and dynamically change Display of dynamic data WWW with Java - more than a document publishing medium http://www.javasoft.com/applets/alpha/applets/StockDemo/standalone.htmlPower of Java and the Web: Power of Java and the Web Deliver applications, not just information Eliminate porting Eliminate end-user installation Slash software distribution costs Reach millions of customers - instantlyJava Development Kit: Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecodes javaprof - Java profiler javadoc - documentation generator javah - creates C header filesJava Environment: Java EnvironmentJava Development Kit: Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecodes javaprof - Java profiler javadoc - documentation generator javah - creates C header filesProcess of Building and Running Java Programs: Process of Building and Running Java Programs Text Editor Java Source Code javac Java Class File java Outout javadoc javah jdb HTML Files Header FilesLet us Try Out: Let us Try Out Building your first Java ProgramHello Internet: Hello Internet // HelloInternet.java: Hello Internet program class HelloInternet { public static void main(String args[]) { System.out.println( “ Hello Internet ” ); } }Program Processing: Program Processing Compilation # javac HelloInternet .java results in HelloInternet.class Execution # java HelloInternet Hello InternetCONTINUED …..: CONTINUED ….. Main Line Public Static Void Main (String args[]) Main :- Starting Point For Interpreter To Begin The Execution Public :- Its An Access Specifier That States Main Method Is Unprotected. Static : -Declares This Method As One That Belongs To Entire Class Void :-Main Method Does Not Return Any Value. String args[] :- Contains An Array Of Objects Of Class Type String.Simple Java Applet: Simple Java Applet // HelloWorld.java import java.applet.Applet; import java.awt.*; public class HelloWorld extends Applet { public void paint(Graphics g) { g.drawString (“Hello World !”,25, 25); } }Calling an Applet: Calling an Applet <HTML> <TITLE>HELLO WORLD APPLET</TITLE> <body> <H1>THE HELLO WORLD APPLET<H1> <APPLET CODE=“HelloWorld.class” width=500 height=500> </APPLET> </body> </HTML>Applet Execution: Applet Execution Using AppletViewer Using BrowserJava Program Structure: 41 Java Program Structure Documentation Section Package Statement Import Statements Interface Statements Class Declarations Main Method Class { }More Java: Classes and static methods: 42 More Java: Classes and static methods // SquareRoot.java: compute square root of number import java.lang.Math; class SquareRoot { public static void main(String args []) { double x = 4; double y; y = Math.sqrt(x); System.out.println("y= "+y); } }Basic Data Types: 43 Basic Data Types Types boolean either true o r false char 16 bit Unicode 1.1 byte 8-bit integer short 16-bit integer int 32-bit integer long 64-bit integer float 32-bit floating point (IEEE 754-1985) double 64-bit floating point (IEEE 754-1985) String (class for manipulating strings)Variables: 44 Varia bles Local Variables are declared within the block of code Variable has a type preceding the name Initial value is set by initialization expressions. type variableName = initialValue; e.g. int x = 1 ; Variables can be defined just before their usage (unlike C) e.g., for( int i = 0; i < 10; i++)Declaring Constants - example : 45 Declaring Constants - example class CircleArea { public static void main(String args[]) { final double PI = 3.1428; double radius = 5.5; // in cms double area; area = PI * radius * radius; System.out.println("Circle Radius = "+radius+" Area="+area); } }Constants: 46 Constants Constants are similar to variables except that they hold a fixed value. They are also called “READ” only variables. Constants are declared with the reserved word “final”. final int MAX_LENGTH = 420; final double PI = 3.1428; By convention upper case letters are used for defining constants.Comments: 47 C omments English te xt scattered through the code are comments JAVA supports 3 types of comments /* */ - Usually used from multi-line comments // - Used for single line comments /** */ - Documentation commentsSummary: Summary Java has emerged as a general purpose OO language. It supports both stand alone and Internet Applications. Makes the Web Interactive and medium for application delivery. Provides an excellent set of Tools for Application Development. Java is ubiquitous!References: References Chapter 2: “Java Evolution”, Programming with Java by Balagurusamy, TMH, New Delhi, India Optional: Chapter 1: “Mastering C++” by V. Rajuk and R. Buyya, Tata McGraw Hill, New Delhi, India.