Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Lab#1 (14/3/1431h) Introduction To java programming cs425
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.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Introduction to Java Kiyeol Ryu Java Programming Language.
1 Introduction to Java and Applet Lecture 3 from Chapters 1 and 2 of the complete reference.
For more Lectures and Notes Visit
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Introduction to Java.
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.
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
CS413: Java Programming language Applications Applets
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
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.
Computer Programming 12 Mr. Jean March 19 th, 2013.
1.  At the end of this slide, student can:  Explore tools, features, properties and interface of the Textpad.  Creating a new project.  Open and run.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
JAVA Java is a programming language and computing platform first released by Sun Microsystems in It was first developed by James Gosling at Sun Microsystems,
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.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs.
POS 406 Java Technology And Beginning Java Code
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
Session 1 Introduction to Java. Objectives Java Simplified / Session 1 / 2 of 32 Explain the history of Java Explain Java in brief List the types of Java.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Java – in context Main Features From Sun Microsystems ‘White Paper’
การเขียนโปรแกรมภาษา จาวา Java Programming อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 1.
ITP 109 Week 2 Trina Gregory Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Lesson 2: First Java Programs. 2.1 Why Java? Java is one of the most popular programming languages in the world. Java is a modern object-oriented programming.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Applications Active Web Documents Active Web Documents.
Chapter 1 Introduction to Computers, Programs, and Java
Text by: Lambert and Osborne
Java programming lecture one
Introduction Enosis Learning.
Introduction Enosis Learning.
Getting Started ARCS Lab..
Java Applets.
(Computer fundamental Lab)
Chap 1. Getting Started Objectives
Review of Previous Lesson
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:

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming Interface â Java Applications & Applets

What Is Java ? âAn Object Oriented Language and platform developed by Sun Micro Systems that is machine independent and can be used to write applications and applets for the internet. âDeveloped initially for home electronics as a language that could be used with any microprocessor in the home on devices such as converters and remote controls. âSun saw a benefit for such a language and realized it could be applied to computing and the internet. âWrite once run anywhere. Pure Java programs are compiled into machine-independent byte-code which runs consistently on any platform.

The authors of Java have written the Java “White Paper” that explains their design goals and accomplishments. The paper is organized around the following buzzwords: Simple â Powerful but easy to learn in comparison to other object oriented languages. (ie. C++ not VB) Object Oriented â Concentrates on the data represented in objects that have both a state and behavior. â As a developer, you concentrate on the data in your objects and then the methods that act upon them. Introduction To Java

Object Oriented â This differs significantly from procedural based programming where the focus was on the procedures of the program, not the data being manipulated. â Java comes with a rich set of classes that you can re-use to to build your own programs. â For example, Java provides a set of classes you can use to create a Graphical user interface. â Almost everything in Java is an object except the primitive data types you are familiar with. (integers, doubles etc.) Introduction To Java

Interpreted & Distributed Interpreted â Java contains a compiler that translates Java source code into byte-code for the Java Virtual Machine. â Byte-code is machine independent which means it is not dependent on the native machine code. â It can run on any platform. Distributed â Distributed simply means Java provides a lot of support for networking. Introduction To Java

Distributed â Java can read remote files and resources across networks almost as easily as reading from the local file system. â Java also allows for objects to send messages to one another across networks as if they were local objects. â This is called RMI. (Remote Method Invocation) Robust â Java puts considerable emphasis on early checking for possible problems,dynamic(run-time) checking, and eliminating situations that are error prone.

â Java has built in security features that verifies code before it is executed if it originates from an unknown source. â Applets are Java programs that come from unknown sources and run within the confines of your browser. â Applets that come from sources not trusted are placed in what is commonly called a sandbox inside your browser. â As a result Applets are limited as to what they can do and cannot do the following: â Read Files, Write Files, Delete Files, Rename Files. Introduction To Java Secure:

Architecture Neutral & Portable â As mentioned earlier, the Java compiler generates byte-code for the Java Virtual Machine. â Byte-codes can run on any platform such as Mac, Unix, Windows, etc. â Java can run on any platform as long as that system implements the Java Virtual Machine (JVM) Introduction To Java

High Performance â Java is an interpreted language. â It is not as fast as compiled languages such as C but is still more than adequate to run interactive GUI and Network based applications. â However, you can get Just In Time (JIT) compilers in Java that can translate byte-code into machine code for a particular CPU. Introduction To Java

Multithreaded â Java allows the user to program multiple threads, which are small programs that run simultaneously. â A developer may want to write a program that plays an audio clip. â At the same time a the program may have the capability to download a file. Introduction To Java

Dynamic â Java was designed to be dynamic. â Java is a language that can adapt to a changing environment. â As time passes, new API Classes are developed that can easily be implemented with already existing Classes. Introduction To Java

The Java Platform The Java Platform consists of the following: â The Java Virtual Machine (JVM)  Java compiler and interpreter â Java Core Classes (API) (Application Programming Interface) â Java Documentation â Java Development Kit (JDK) incorporates all points above.

The Java Virtual Machine â You can think of the JVM as a computer integrated in software on your computer. â When you compile Java source code it is compiled into byte-codes. â The JVM is capable of interpreting these instructions in the form of machine independent byte-codes. â This is the key to a Java programs portability. â As long as your computer runs the JVM or your web browser is Java enabled, you will be able to execute Java byte-codes and therefore run Java Applications and Applets.

How Java Works

The Java Core Classes (API) â When programming in Java you have access to a rich set of programming elements called Classes. â You can use these Classes to build your programs. ie java.utilVector java.langString â These classes are called the Java Core Classes. â The JDK documentation provides a complete list of the core classes and their specifications. â Let’s take a look at the JDK documentation.

The Java Development Kit (JDK) How do we build Java Applications and Applets? â We use the Java Development Toolkit which includes the JVM, the core API and various tools. â We can use a set of tools provided by Java. These tools are located in the jdk bin directory on your computer. â Some of the tools you will come most familiar with are: javac compiles java files into byte-code java runs class files (also called the interpreter) appletviewer built in browser for running applets javadoc compiles javadoc comments in html format â These tools are very crude and are run from the dos prompt.

The Tools We Will Use Text Editors â We will begin our work in Java using text editors to create simple Applications and Applets. â Any text editor can be used, but we will use: Notepad Text Pad âShareware version of Text Pad has been installed for you on the image.

The Tools We Will Use Visual Age For Java â An application development tool from IBM. (Version 2) â Visual Age greatly enhances our ability to develop applications and applets by providing us with these key features: IDE (Integrated Development Environment) Workbench (Organizes packages and classes) Smart Guides (Similar to wizards in MS Access) VCE (Visual Composition Editor) Visual Age Debugger

Java Applications Run stand alone in the JVM All applications have a starting point public static void main (String [] args) {} Can be simple command line programs or more advanced GUI programs that we are use to. Demonstration of a simple Java Application

Java Applets Run in web browser or appletviewer Invoked by HTML tags Call must extend: java.applet.Applet Use methods: init, start, paint, stop, destroy Demonstration of a simple Java Applet