Introduction to Java Programming. Introduction Course Objectives Organization of the Book.

Slides:



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

Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java The objectives of this chapter are: To describe the key aspects of Java To describe the Java software development kit (SDK) To explain.
Introduction to Java Kiyeol Ryu Java Programming Language.
Excerpts from Introduction to Java Programming, 4E Author: Y. Daniel Liang (Copyright by Prentice Hall)
Introduction to Java Programming, 4E
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 16 Applets.
Unit2: Object-oriented programming Getting started with Java Jin Sa.
Honors 101, Fall 2006 Please do not sit in back of room! Lots of info on web page Join the mailing list Download Eclipse and start using it Read the text.
Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Developing User Interfaces (DUI) Chris North cs3724: HCI.
Getting Started What is Java? A programming language –Fully buzzword-compliant: A simple, object oriented, distributed, interpreted, robust, secure,
Java Programming Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
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.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
CTIS251-Week 1 Engineering Software and Java Dr. Ozlem Albayrak.
Introduction to Java Programming with JBuilder 4
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
Chapter 1 Introduction to Computers, Programs, and Java 1.
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.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
CPCS  Problem Solving in Everyday Life  Types of Problems  Problem Solving with Computers  Difficulties with Problem Solving 0-3.
1 Chapter 1 Introduction to Computers, Programs, and Java.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs,
Introduction to Java Programming. History F James Gosling and Sun Microsystems F Oak F Java, May 20, 1995, Sun World F HotJava –The first Java-enabled.
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.
1 Part I : Chapter 01 Introduction to Java Programming.
1 Chapter 3 Programs and Java. 2 Objectives F To review computer programs, and operating systems. F To represent numbers in binary, decimal, and hexadecimal.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Chapter 1: Introduction to Programs, and Java 1. Objectives To review programs (§ ). To understand the relationship between Java and the World Wide.
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
Introduction to Java Programming with Forte Y. Daniel Liang.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Selected Topics in Information Technology Programming Language - JAVA Semester 1/2554.
Object Oriented Rabie A. Ramadan, PhD Slides are exerted from different sources.
Java Programming Lecture 1 Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
Introduction To JAVA By Ihtesham Ul Haq. Course Objectives Upon completing the course, you will understand Upon completing the course, you will understand.
1 Chapter 3 Introduction to Computers, Programs, and Java.
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.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
SOFTWARE TECHNOLOGY - I JAVA/OOP Wickramanayake HMKSK Department of Electrical & Electronic Engineering Faculty of Engineering University.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
WEEK 2 1 Software Concepts -- Introduction Now we can begin to examine the basic ideas behind writing programs Chapter 2 focuses on: history.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Introduction to JAVA Programming
Introduction to Java Programming, 4E Y. Daniel Liang.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Chapter 1 Introduction to Computers, Programs, and Java
Chapter No. : 1 Introduction to Java.
Introduction to Advanced Java Programming
Chapter 1 Introduction to Computers, Programs, and Java
Chapter 1 Introduction to Computers, Programs, and Java
Java Applets.
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 Programming

Introduction Course Objectives Organization of the Book

Course Objectives Upon completing the course, you will understand – Java applications and applets – Primitive data types – Java control flow – Methods – Object-oriented programming – Core Java classes (Swing, exception, internationalization, multithreading, multimedia, I/O, networking)

Course Objectives, cont. You will be able to – Write applications and applets – Develop a GUI interface – Write interesting projects – Establish a firm foundation on Java concepts

Book Chapters Part I: Fundamentals of Programming – Chapter 1: Introduction to Java – Chapter 2: Primitive Data Types and Operations – Chapter 3: Control Statements – Chapter 4: Methods

Book Chapters, cont. Part II: Object-Oriented Programming – Chapter 5: Programming with Objects and Classes – Chapter 6: Class Inheritance – Chapter 7: Arrays and Vectors

Book Chapters, cont. Part III: Graphics Programming – Chapter 8: Getting Started with Graphics Programming – Chapter 9. Creating User Interfaces – Chapter 10. Applets and Advanced Graphics

Book Chapters, cont. Part IV: Developing Comprehensive Projects – Chapter 11. Exception Handling – Chapter 12. Internationalization – Chapter 13. Multithreading – Chapter 14. Multimedia – Chapter 15. Input and Output – Chapter 16. Networking

Chapter 1: Introduction to Java Course Objectives What Is Java? Getting Started With Java Programming – Compiling and Running a Java Application – Compiling and Running a Java Applet

What Is Java? History Characteristics of Java

History James Gosling Oak Java, May 20, 1995, Sun World HotJava – The first Java-enabled Web browser

Characteristics of Java Java is simple Java is object-oriented Java is distributed Java is interpreted Java is robust Java is secure Java is architecture-neutral Java is portable Java’s performance Java is multithreaded Java is dynamic

Different Versions of Java Standard Edition, J2SE – Core of programming language Enterprise Edition, J2EE – For enterprise applications Micro Edition, J2ME – For small devices

J2SE

J2EE Architecture

J2ME

JDK Versions JDK 1.02 (1995) JDK 1.1 (1996) Java 2 SDK v 1.2 (a.k.a JDK 1.2, 1998) Java 2 SDK v 1.3 (a.k.a JDK 1.3, 2000) Java 2 SDK v 1.4 (a.k.a JDK 1.4, 2002)

Java Language Specification The application programming interface (API) of Java You can also download the document to your local PC –

Java IDE Tools Inprise JBuilder (RAD) Microsoft Visual J++ Symantec Café (RAD) Rouge Wave JFactory Sun Java Workshop IBM Visual Age for Java (RAD) Sun’s Forte (RAD)

Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications A Simple Java Applet Viewing Java Applets Applications vs. Applets

A Simple Application Example 1.1 //This application program prints Welcome //to Java! public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); }

Compiling Programs On command line – javac file.java

Executing Applications On command line – java classname

Example javac Welcome.java java Welcome output:...

A Simple Applet (Optional) Example 1.2 /* This is an example of Java applets */ import java.awt.Graphics; public class WelcomeApplet extends java.applet.Applet { public void paint (Graphics g) { g.drawString("Welcome to Java!",10,10); }

Creating an HTML File <applet code="WelcomeApplet.class" width = 100 height = 40>

Viewing Java Applets

Applet Viewer Utility appletviewer htmlfile.html Example: appletviewer WelcomeApplet.html

Applications vs. Applets Similarities Differences

Security Restrictions on Applets Applets are not allowed to read from, or write to, the file system of the computer viewing the applets. Applets are not allowed to run any programs on the browser’s computer. Applets are not allowed to establish connections between the user’s computer and another computer except with the server where the applets are stored.

JBuilder User interface of JBuilder Creating a project Editing a Java program Compiling a Java program Executing a Java program

Anatomy of a Java Program Comments Packages Reserved words Modifiers Statements Blocks Classes Methods The main Method