Introduction to JAVA Programming Language

Similar documents
History Introduction to Java Characteristics of Java Data types

Introduction to Java Programming CPIT 202. WEWwwbvxnvbxmnhsgfkdjfcn

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Lecture 1: Introduction to Java

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1 Introduction to Java

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

CHAPTER 1. Introduction to JAVA Programming

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1 Introduction to Computers, Programs, and Java

IQTIDAR ALI Lecturer IBMS Agriculture University Peshawar

Networks Programming Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

History of Java. Java was originally developed by Sun Microsystems star:ng in This language was ini:ally called Oak Renamed Java in 1995

II. Compiling and launching from Command-Line, IDE A simple JAVA program

Chapter 1 Introduction to Computers, Programs, and Java

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

CHAPTER 1 Introduction to Computers and Java

C++ Spring Break Packet 11 The Java Programming Language

CT 229. CT229 Lecture Notes. Labs. Tutorials. Lecture Notes. Programming II CT229. Objectives for CT229. IT Department NUI Galway

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

Objectives. Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer?

Eng. Mohammed S. Abdualal

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

Chapter 2 First Java Programs

Java Programming Language Mr.Rungrote Phonkam

Introduction to OOP Using Java Pearson Education, Inc. All rights reserved.

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

Chapter 1: Introduction to Computers, Programs, and Java

Full file at

Getting Started. Chapter 1. Java Programming FROM THE BEGINNING. Chapter 1: Getting Started

Chapter 1 Introduction to Computers, Programs, and Java

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

From High Level to Machine Code. Compilation Overview. Computer Programs

Introduction. Introduction to OOP with Java. Lecture 01: Introduction to OOP with Java - AKF Sep AbuKhleiF -

Lesson 2: First Java Programs

Introduction to OOP with Java. Instructor: AbuKhleif, Mohammad Noor Sep 2017

Introduction to Java Programming

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Objects and Classes Lecture 1

Chapter 1 Introduction to Computers, Programs, and Java

DAY 3 J2ME Aalborg University, Mobile Device Group. Mobile. Mobile Phone Programming

Chapter 1 Introduction to Computers, Programs, and Java

DevPartner Java Edition System Requirements Release 4.3

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Module 1: Introduction to Computers, Programs, and Java

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Introduction To Java. Chapter 1. Origins of the Java Language. Origins of the Java Language. Objects and Methods. Origins of the Java Language

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

Chapter 1 Introduction to Computers, Programs, and Java

CS5015 Object-oriented Software Development. Lecture: Overview of Java Platform. A. O Riordan, 2010 Most recent revision, 2014 updated for Java 8

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang

Java Puzzle Ball Nick Ristuccia

Introduction to Computers and Java

Eclipse. JVM, main method and using Eclipse. Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

Introduction to Java. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Introduction. Lecture 1 MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz

1. What is Jav a? simple

Introduction to Java and OOP. Hendrik Speleers

Expeditor Client for Desktop. Client Platform Overview

Advanced Object-Oriented Programming Introduction to OOP and Java

Borland Optimizeit Enterprise Suite 6

Supplement H.1: JBuilder X Tutorial. For Introduction to Java Programming, 5E By Y. Daniel Liang

Agenda. Announcements. Extreme Java G Session 2 - Main Theme Java Tools and Software Engineering Techniques

Supplement II.B(1): JBuilder X Tutorial. For Introduction to Java Programming By Y. Daniel Liang

1. Java is the fastest growing programming language in the world.

Introduction to Computers and Java

Introduction Welcome! Before you start Course Assessments The course at a glance How to pass M257

This lecture will take you through simple and practical approach while learning Java Programming language.

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

Index. Course Outline. Grading Policy. Lab Time Distribution. Important Instructions

Mathematics for Computer Graphics - Lecture 8

USING THE OOSIML/JAVA COMPILER. With the Command Window

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer:

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

Lesson 01 Introduction

Part I: Fundamentals of Programming

Class List. Java Must Have. Class Goals. Class Goals. Schedule

PLATFORM TECHNOLOGY UNIT-5

CS335 Graphics and Multimedia

Eng. Mohammed Alokshiya

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of

Introduction to Programming

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

Developing Java TM 2 Platform, Enterprise Edition (J2EE TM ) Compatible Applications Roles-based Training for Rapid Implementation

25. DECUS Symposium THE Application Development Environment for OpenVMS

History of Enterprise Java

Notes of the course - Advanced Programming. Barbara Russo

Borland Application Server Certification. Study Guide. Version 1.0 Copyright 2001 Borland Software Corporation. All Rights Reserved.

Designing a Distributed System

USING THE OOSIML/JAVA. With a Terminal Window

Chapter 1. Introduction

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA

Developing Web Sites with Free Software

Transcription:

Introduction to JAVA Programming Language Lecture 2 Based on Slides of Dr. Norazah Yusof 1

Origins of the Java Language Patrick Naughton and Jonathan Payne at Sun Microsystems developed a Web browser that could run programs over the Internet (1994) and evolved into the HotJava browser. Beginning of Java's connection to the Internet To show off the power of applets, they made the browser capable of executing code inside web pages. Netscape Incorporated made its Web browser capable of running Java programs (1995) Other companies follow suit 2

The Java Language Java is a full-featured, general-purpose programming language that is capable of developing robust missioncritical applications. Today it is used for developing stand alone applications, desktops, web programming, servers, and mobile devices. Java can be run on the web browser called the applets. Java can also be used to develop applications on the server side, called Java servlets or Javaserver pages (JSP) Java can be used to develop applications for small handheld devices, such as personal digital assistants and cell phones. 3

The Java Language Specification Java language specification defines the Java standard and the technical definition of the language that includes the syntax and semantics of the Java programming language. stable Java application program interface (API) contains predefined classes and interfaces for developing Java programs. Still expanding 4

Java API Java 1.0 was introduced in 1995. December 1998, Sun announced the Java 2 platform the brand that applies to current Java technology. There are 3 editions of the Java API: Java 2 standard edition (J2SE) client-side standalone applications or applets Java 2 Enterprise Edition (J2EE) server-side applications, such as Java servlets and JavaServer Pages Java 2 Micro Edition (J2ME) mobile devices, such as cell phones 5

J2SE version There are many versions of J2SE. The latest version is J2SE 6.0. Sun releases each version of J2SE with a Java Development toolkit (JDK) For J2SE 5.0, the Java development toolkit is called JDK 5.0 formerly was known as JDK1.5 JDK consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line. 6

Java Development Tools Java development tool is a software that provides an integrated development environment (IDE) for rapidly developing Java programs. Other Java development tools on the market (besides JDK 5.0): JBuilder by Borland NetBeans Open Source by Sun Eclipse Open Source by IBM Other useful tools: Code warrior by Metrowerks TextPad Editor JCreator LE JEdit JGrasp BlueJ DrJava 7

Java Program Java program can be written in many ways: Applications Applets Servlets 8

Java Applications A Java applications or "regular" Java programs are standalone programs that can be executed from any computer with a JVM. It is a class with a method named main When a Java application program is run, the run-time system automatically invokes the method named main All Java application programs start with the main method 9

Java Applets A Java applet (little Java application) is a Java program that is meant to be run from a Web browser Can be run from a location on the Internet Can also be run with an applet viewer program for debugging Applets always use a windowing interface 10

Java Servlets A Java servlets are special kind of Java programs that run from a Web server to generate dynamic Web contents. 11

Objects and Methods in Java Java is an object-oriented programming (OOP) language Programming methodology that views a program as consisting of objects that interact with one another by means of actions (called methods) Objects of the same kind are said to have the same type or be in the same class 12

The Compiler and the Java Virtual Machine A programmer writes Java programming statements for a program. These statements are known as source code. A text editor is used to edit and save a Java source code file. Source code files have a.java file extension. A compiler is a program that translates source code into an executable form. 13

The Compiler and the Java Virtual Machine A compiler is run using a source code file as input. Syntax errors that may be in the program will be discovered during compilation. Syntax errors are mistakes that the programmer has made that violate the rules of the programming language. The compiler creates another file that holds the translated instructions. 14

Byte-Code and the Java Virtual Machine (JVM) The compilers for most programming languages translate high-level programs directly into the machine language for a particular computer Since different computers have different machine languages, a different compiler is needed for each one In contrast, the Java compiler translates Java programs into byte-code, a machine language for a fictitious computer called the Java Virtual Machine Once compiled to byte-code, a Java program can be used on any computer, making it very portable 15

The Compiler and the Java Virtual Machine Byte code files end with the.class file extension. The JVM is a program that emulates a microprocessor. The JVM executes instructions as they are read. JVM is often called an interpreter. Java is often referred to as an interpreted language. 16

Program Development Process Text editor Saves Java statements Source code (.java) Java compiler Produces Byte code (.class) Java Virtual Machine Results in Program Execution 17

Portability Portable means that a program may be written on one type of computer and then run on a wide variety of computers, with little or no modification. Java byte code runs on the JVM and not on any particular CPU; therefore, compiled Java programs are highly portable. JVMs exist on many platforms: Windows Macintosh Linux Unix BSD Etc. 18

Portability With most programming languages, portability is achieved by compiling a program for each CPU it will run on. Java provides an JVM for each platform so that programmers do not have to recompile for different platforms. 19

Portability Byte code (.class) Java Virtual Machine for Windows Java Virtual Machine for Unix Java Virtual Machine for Linux Java Virtual Machine for Macintosh 20