1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.

Slides:



Advertisements
Similar presentations
CSci 1130 Intro to Computer Programming in Java
Advertisements

EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Chapter 1 Introduction to JAVA. Why Learn JAVA? Java is one of the fastest growing programming language in the world. Java is one of the fastest growing.
Visual and Internet Programming using JAVA
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.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Java Environment (CSS444)
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 1 – Introduction to Computers and C++ Programming.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers and C++ Programming Outline 1.1Introduction 1.2What Is a Computer?
 2002 Prentice Hall. All rights reserved. Week 1 - Introduction to Object- Oriented Programming Outline 1.1 Machine Languages, Assembly Languages and.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
 2003 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a.
1 Chapter 1 - Introduction to Computers, the Internet, and the World Wide Web Outline 1.1Introduction 1.2What Is a Computer? 1.3Computer Organization 1.4Evolution.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
 2005 Pearson Education, Inc. All rights reserved. 1 Introduction & The Java Virtual Machine Small Java Chapter 1 1.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
 2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)
111 © 2002, Cisco Systems, Inc. All rights reserved.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
 2005 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web.
History of C and C++ C++ evolved from C ANSI C C++ “spruces up” C
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
 2002 Prentice Hall. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a Computer?
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 1 Introduction to Computers, the Internet and.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 5 Information System Software.
24.1Introduction Java Powerful, object-oriented language Fun to use for beginners, appropriate for experience programmers Language of choice for Internet.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
 2000 Prentice Hall, Inc. All rights reserved. 1 Chapter 1 - Introduction to Computers, the Internet, and the World Wide Web Outline 1.1Introduction 1.2What.
CT1513 Introduction To java © A.AlOsaimi.
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.
Chapter 1: An Overview of Computers and Programming Languages
 2001 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet and the World Wide Web Outline 1.1Introduction 1.2What.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
CHAPTER 1.1 INTRODUCTION TO COMPUTERS AND C++ Dr. Shady Yehia Elmashad.
1 Chapter 1 Java –Originally for intelligent consumer-electronic devices –Then used for creating Web pages with dynamic content –Now also used for: Develop.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
Web Design & Development Lecture 2. Intro to Java.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Introduction to JAVA Programming
Software Engineering Algorithms, Compilers, & Lifecycle.
Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a Computer? 1.3 Computer Organization 1.4 Evolution.
 2001 Prentice Hall, Inc. All rights reserved.
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
CSCI-235 Micro-Computer Applications
Chapter 1 – Introduction to Computers and C++ Programming
Java programming lecture one
Chapter 1 – Introduction to Computers, the Internet, and the Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
Chapter 1 – Introduction to Computers and C++ Programming
Chapter 1 – Introduction to Computers and C++ Programming
Chapter 1 – Introduction to Computers, the Internet, and the Web
Computer Programming-1 CSC 111
Chapter 1 – Introduction to Computers and C++ Programming
Presentation transcript:

1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project in danger of being cancelled –Internet exploded in 1993, saved project Used Java to create web pages with dynamic content –Java formally announced in 1995 –Now used to create web pages with interactive content, enhance web servers, applications for consumer devices (pagers, cell phones)...

1.9 Java Class Libraries Java programs –Consist of pieces called classes –Classes contain methods, which perform tasks Class libraries –Also known as Java API (Applications Programming Interface) –Rich collection of predefined classes, which you can use Two parts to learning Java –Learning the language itself, so you can create your own classes –Learning how to use the existing classes in the libraries

1.10Other High-Level Languages A few other high-level languages have achieved broad acceptance –FORTRAN (FORmula TRANslator) Scientific and engineering applications –COBOL (COmmon Business Oriented Language) Used to manipulate large amounts of data –Pascal Intended for academic use –BASIC Developed in 1965 as a simple language to help novices

1.11Structured Programming Structured programming –Disciplined approach to writing programs –Clear, easy to test and debug, and easy to modify –Pascal designed to teach structured programming in universities Not used in industrial or commercial applications Multitasking –Specifying that many activities run in parallel –C and C++ only allow one activity to be performed at a time –Java allows multithreading, where activities can occur in parallel

1.12The Internet and the World Wide Web The Internet –Developed 30 years ago, funded by the Department of Defense –Originally designed to link universities, now accessible by hundreds of millions of computers World Wide Web –Allows users to view multimedia-based documents –Internet has exploded Mixes computing and communication Changes the way business is done Information instantly accessible We cover Java applications that use the Internet

1.13Basics of a Typical Java Environment Java Systems –Consist of environment, language, Java Applications Programming Interface (API), Class libraries Java programs have five phases –Edit Use an editor to type Java program vi or emacs, notepad, Jbuilder, Visual J++.java extension –Compile Translates program into bytecodes, understood by Java interpreter javac command: javac myProgram.java Creates.class file, containing bytecodes (myProgram.class)

1.13 Basics of a Typical Java Environment Java programs have five phases (continued) –Loading Class loader transfers.class file into memory –Applications - run on user's machine –Applets - loaded into Web browser, temporary Classes loaded and executed by interpreter with java command java Welcome HTML documents can refer to Java Applets, which are loaded into web browsers. To load, appletviewer Welcome.html –appletviewer is a minimal browser, can only interpret applets

1.13 Basics of a Typical Java Environment Java programs have five phases (continued) –Verify Bytecode verifier makes sure bytecodes are valid and do not violate security Java must be secure - Java programs transferred over networks, possible to damage files (viruses) –Execute Computer (controlled by CPU) interprets program one bytecode at a time Performs actions specified in program –Program may not work on first try Make changes in edit phase and repeat

Program is created in the editor and stored on disk. Compiler creates bytecodes and stores them on disk. Class loader puts bytecodes in memory. Bytecode verifier confirms that all bytecodes are valid and do not violate Java’s security restrictions. Interpreter reads bytecodes and translates them into a language that the computer can understand, possibly storing data values as the program executes. Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Disk Editor Compiler Class Loader Disk Primary Memory Primary Memory Primary Memory Bytecode Verifier Interpreter

1.14General Notes about Java and This Book Java –Powerful language –Programming notes Clarity - Keep it Simple Portability - Java very portable, but it is an elusive goal –Some details of Java not covered for documentation –Performance Interpreted programs run slower than compiled ones –Compiling has delayed execution, interpreting executes immediately Can compile Java programs into machine code –Runs faster, comparable to C / C++

1.14 General Notes about Java and This Book Just-in-time compiler –Midway between compiling and interpreting As interpreter runs, compiles code and executes it Not as efficient as full compilers –Being developed for Java –Integrated Development Environment (IDE) Tools to support software development Several Java IDE's are as powerful as C / C++ IDE's

Hello World

Comments The Java language supports three kinds of comments: /* text */ The compiler ignores everything from /* to */. /** documentation */ This indicates a documentation comment (doc comment, for short). The compiler ignores this kind of comment, just like it ignores comments that use /* and */. The JDK javadoc tool uses doc comments when preparing automatically generated documentation. For more information on javadoc, see the Java tool documentation. // text The compiler ignores everything from // to the end of the line.

Applet

HTML A Simple Program Here is the output of my program: