Java By Ajay Tripathi. Pre requisites…..  C and C++  OOP  Internet and WWW.

Slides:



Advertisements
Similar presentations
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Object Orientated Programming
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Introduction to Java Kiyeol Ryu Java Programming Language.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
For more Lectures and Notes Visit
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Java program.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
INTRODUCTION TO WEB DATABASE PROGRAMMING
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Chapter 1 Coding Introduction.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Introduction to Java Kumar Harshit. Objectives ( 목적지 ) At the end of the lesson, the student should be able to: ● Describe the features of Java technology.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
1. 2 is high level programming language like C++, Visual Basic, developed by James Gosling and Patrick Naughton at Sun Microsystems in 1991.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Java Beserkers Group 4. Start of Java Development began on June of 1991 by a group of computer scientist at the Sun Mircrosystems Company Development.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.
CS 7: Introduction to Computer Programming Java and the Internet Sections ,2.1.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
Chapter 2: A Brief History Object- Oriented Programming Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
We will talking about story of JAVA language. By Kristsada Songpartom.
Java and its Evolution. Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
1 The JAVA Language Object Oriented Technology Mithani Binjan M.
Introduction Mehdi Einali Advanced Programming in Java 1.
Java – in context Main Features From Sun Microsystems ‘White Paper’
Introduction to Programming 1 1 2Introduction to Java.
Introduction to JAVA Programming
JAVA TRAINING IN NOIDA. Introduction to Java:  Java training in noida is a general-purpose computer programming language that is concurrent, class-based,
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Chapter 1 Coding Introduction.
G. Pullaiah College of Engineering and Technology
Object Oriented Programming in
Java™ 2 Platform Getting Started.
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Chapter 1 Introduction to Computers, Programs, and Java
The Java Programming Language
Introduction Enosis Learning.
An Overview of Java.
Chapter 1 FOUNDATIONS OF JAVA
PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented.
Introduction Enosis Learning.
Advanced Programming Fall 2017.
(Computer fundamental Lab)
Java History, Editions, Version Features
By Rajanikanth B Overview Of Java By Rajanikanth B
CSC 142 Introduction to Java [Reading: chapters 1 & 2]
Java Evolution Java History. Java Features.
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Java By Ajay Tripathi

Pre requisites…..  C and C++  OOP  Internet and WWW

History  Phase I Introduction of C++ in 1979 And became the stock programming language in the 90’s. Standardized in Nov Success Reasons? It enhanced an existing successful language like C instead of building an entirely a new language.

PHASE 2 (GUI)  Object orientation permits reusable code, hence a Graphical User interface GUI (E.g. MS-Windows).  GUI has enormously expanded the number of computer-users.  Object oriented programming (OOP) with GUI is the “grand consensus of the computer industry”.

PHASE III (Internet)  Internet stared in the 1960’s as a way to maintain communications in the event of a nuclear attack.  Success of ARPANET inspired NSFNET.  In 1983, TCP/IP became the official protocol which connected ARPANET and NSFNET.  This collection of connected networks came to be called the Internet.  By 1990, 3000 networks and 200,000 computers were connected to the Internet. By 1992, there were 1 million hosts.  The hosts had diverse hardware and operating systems like DOS/Windows, UNIX, and MacOS.  How to share information easily across different computer platforms?

PHASE IV (WWW)  To simplify sharing of documents and data across the Internet, WWW invented in 1989 at CERN, Geneva.  WWW is an architectural framework for viewing documents stored across thousands of machines connected to the Internet.  The scattered document seems like a single document using a browser to view hypertext, which contains hyperlinks.  However, this concerned passive text or document files, and users on the www could not share executable programs.  How to incorporate interactive programs on the Web?  How to share executable programs across platforms?

Java Evolution  In 1990, Sun Microsystems started a project called Green.  Objective: to develop software for consumer electronics.  Sun best known for its popular Unix workstation, Solaris OS, and NetworkFile System (NFS).  Project was assigned to James Gosling, a veteran of classic network software design. Others included Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan.  The team started writing programs in C++ for embedding into toasters, washing machines, VCR’s, PDA’s (Personal Digital Assistants).  Aim was to make these appliances more “intelligent”. But they soon realized...

 C++ is powerful, but also dangerous. – The power and popularity of C derived from the extensive use of pointers. – However, any incorrect use of pointers can cause memory leaks, leading the program to crash. – In a complex program, such memory leaks are often hard to detect.  Robustness is essential – Users have come to expect that Windows may crash or that a program running under Windows may crash.(“This program has performed an illegal operation and will be shut down”) – However, users do not expect toasters to crash, or washing machines to crash. – A design for consumer electronics has to be robust.  Replacing pointers by references, and automating memory management was the proposed solution.

 Oak: Hence, the team built a new programming language called Oak, which – avoided potentially dangerous constructs in C++, such as pointers, pointer arithmetic, operator overloading, etc. – introduced automatic memory management, freeing the programmer to concentrate on other things.  Architecture neutrality (Platform independence) – Many different CPU’s are used as controllers. Hardware chips are evolving rapidly. As better chips become available, older chips become obsolete and their production is stopped. – Manufacturers of toasters and washing machines would like to use the chips available off the shelf, and would not like to reinvest in compiler development every two-three years. – So, the software and programming language had to be architecture neutral.

 It was soon realized that these design goals of consumer electronics perfectly suited an ideal programming language for the Internet and WWW, which should be: – object-oriented (& support GUI)– robust– architecture neutral  Internet programming presented a BIG business opportunity much bigger than programming for consumer electronics. – Java was “re-targeted” for the Internet.  The team was expanded to include Bill Joy (developer of Unix), Arthur van Hoff, JonathanPayne, Frank Yellin, Tim Lindholm etc.  In 1994, an early web browser called WebRunner was written in Oak. WebRunner was later renamed HotJava.  In 1995, Oak was renamed Java. – A common story is that the name Java relates to the place from where the development team got its coffee. – The name Java survived the trade mark search.

 Additional features were added to make Java – secure – multithreaded (concurrent) – distributed and dynamic – high performance Security: - Is a key feature on the Internet. It should be possible to specify what system resources the program can access. – In the sandbox policy remote applets are not trusted to access any local resources, – while local applications are trusted to access all resources. – This can be modified, by allowing digitally signed applets selective access. Multiple threads: - C and C++ support multiple threads, using fork(), – this feature is NOT a part of the ANSI/ISO standard, and is available only on UNIX. – DOS support is available for the spawn...and exec... family of functions. These features are not much used. - But concurrency is essential on the internet, since download times are uncertain, so one process should not block all others. – Threads also needed for e.g. animation.

Distributed: – The ultimate vision of OOP is to have objects stored on different computers to interact with each other. That is, a user can assemble a program different parts of which are stored on different computers. Dynamic: – Java is both compiled and interpreted. – Thus, source code is compiled to bytecode. – The Java Virtual Machine loads and links parts of the code dynamically at runtime. – Hence it carries substantial run time type information on objects. – Hence, It supports late binding.

 High performance – Though Java uses an interpreter, it also has a compiler, which generates machine- independent bytecodes. – Optimization can take place at this stage to ensure that Java programs can match the speed of programs in compiled languages like C++. – Where speed cannot be traded off for platform independence, Java provides “native method support”, for code written in languages like C/C++, and compiled for specific platforms.

SUN MICROSYSTEM OFFICIAL DEFINITION OF JAVA  Java is a simple, small, object oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multithreaded and dynamic language.

Simple  Java is close to C/C++  Eliminate several poorly understood, confusing and rarely used features of C++ like multiple inheritance, operator overloading, header files, pointer arithmetic, structures, unions, multi dimensional arrays, etc.  Java programmers need not to worry about memory mgt, it has its own memory mgt.  It has embedded auto garbage collection for memory mgt.

Small  Goal of Java was to produce programs that run on small machines.  Most of Java programs can run on machine that has 4MB of RAM.

Object Oriented  Focuses on defining data as objects and the methods that may be applied to those objects.

Distributed  Support client server applications.  Share both information and data processing workload either on server or on client.  Objects in Java can be loaded from local machine or remote machine.  Java applications easily communicate with TCP/IP protocols like HTTP and FTP.  Multiple designers at multiple locations can collaborate on a single project.

Interpreted and Compiled  JVM interprets 20% of Java code.  A programmer first compiles Java source code into byte code using Java compiler. This byte code is binary and architecture neutral.  This byte code is not complete until interpreted by a Java run time environment usually Java enabled browser.  Since each Java run time environment is for a specific platform the byte code is going to work on that specific platform.  The downside of this is that it takes longer time to load.

Robust  The more robust a programming environment is, the less likely it is to cause the computer to ‘crash’ and the more likely it is to be bug free.  Strongly typed language i.e. extensive data type checking is done at compile time.  Java programs cant cause crash because it does not have permission to access all of the computers memory.  Java programs can access only restricted area of memory.

Secure  Java programs are always contained under the complete control of the operating system and its run time environment (JVM).  Java byte codes are verified by the Java compiler.  These byte codes are not platform specific and contain extra information. This information can be used to verify the programs legality and security violations.

Architecture Neutral  It can work on multiple networks, variety of CPUs and various O/S.  Java compiler generates an architecture neutral codes. That can be run on a number of O/S and H/W platforms provided that system is running a JVM.

Portable  Java compiler is written in Java and run time environment is written in ANSI C.  The Java interpreter can execute Java byte code on any machine to which the interpreter has been ported.  Developers are need not to worry about Java for Unix, Java for Windows, Java for Novell Netware, Java for Sun Solaris.

Multi-Threaded  Java users don’t have to wait for the application to finish one task before beginning another.

Dynamic  Run time linking with objects.

Java Features: Summary Simple Secure Portable Object-oriented Robust Multithreaded Architecture-neutral Interpreted High-performance Distributed Dynamic