An Overview of Java. overview-1



Similar documents
Crash Course in Java

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

CSC 551: Web Programming. Spring 2004

Java Programming Fundamentals

1. Overview of the Java Language

SE 450 Object-Oriented Software Development. Requirements. Topics. Textbooks. Prerequisite: CSC 416

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Java Interview Questions and Answers

Chapter 1 Java Program Design and Development

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

CS506 Web Design and Development Solved Online Quiz No. 01

Introduction to Java

Syllabus for CS 134 Java Programming

Fundamentals of Java Programming

Enterprise Java. Where, How, When (and When Not) to Apply Java in Client/Server Business Environments. Jeffrey Savit Sean Wilcox Bhuvana Jayaraman

Applets, RMI, JDBC Exam Review

TABLE OF CONTENTS...2 INTRODUCTION...3 APPLETS AND APPLICATIONS...3 JAVABEANS...4 EXCEPTION HANDLING...5 JAVA DATABASE CONNECTIVITY (JDBC)...

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Programming Languages

2 Introduction to Java. Introduction to Programming 1 1

Java the UML Way: Integrating Object-Oriented Design and Programming

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

CS 209 Programming in Java #1

Essentials of the Java(TM) Programming Language, Part 1

CSC 551: Web Programming. Fall 2001

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

Java Application Developer Certificate Program Competencies

public static void main(string[] args) { System.out.println("hello, world"); } }

Chapter 2 Introduction to Java programming

DC60 JAVA AND WEB PROGRAMMING JUNE b. Explain the meaning of the following statement public static void main (string args [ ] )

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Essentials of the Java Programming Language

Java applets. SwIG Jing He

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

Java programming for C/C++ developers

picojava TM : A Hardware Implementation of the Java Virtual Machine

Java Network. Slides prepared by : Farzana Rahman

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

JAVA IN A NUTSHELL O'REILLY. David Flanagan. Fifth Edition. Beijing Cambridge Farnham Köln Sebastopol Tokyo

Online Recruitment System 1. INTRODUCTION

Habanero Extreme Scale Software Research Project

3.5. cmsg Developer s Guide. Data Acquisition Group JEFFERSON LAB. Version

Creating a Simple, Multithreaded Chat System with Java

Developing Embedded Software in Java Part 1: Technology and Architecture

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

What Perl Programmers Should Know About Java

Pemrograman Dasar. Basic Elements Of Java

Java Crash Course Part I

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Building a Multi-Threaded Web Server

AP Computer Science Java Subset

Habanero Extreme Scale Software Research Project

Java (12 Weeks) Introduction to Java Programming Language

Programmation Orientée Objets. et langage Java

Lecture 5: Java Fundamentals III

Java and Java Virtual Machine Security

Lesson: All About Sockets

Extending Desktop Applications to the Web

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

Web Development in Java

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents

Introduction to Java Applets (Deitel chapter 3)

The Java Virtual Machine (JVM) Pat Morin COMP 3002

Installing Java. Table of contents

Install Java Development Kit (JDK) 1.8

Tutorial Reference Manual. Java WireFusion 4.1

Programmation 2. Introduction à la programmation Java

How to Install Java onto your system

IT6503 WEB PROGRAMMING. Unit-I

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

BHARATHIAR UNIVERSITY COIMBATORE SCHOOL OF DISTANCE EDUCATION

CS1020 Data Structures and Algorithms I Lecture Note #1. Introduction to Java

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

Evolution of the Major Programming Languages

Chapter 1 Introduction to Computers, Programs, and Java

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.

Contents. 9-1 Copyright (c) N. Afshartous

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Overview. The Android operating system is like a cake consisting of various layers.

Study of Development of Java Applications in Eclipse Environment and Development of Java Based Calendar Application with Notifications

Chapter 1. Introduction to Computers, Programs, and Java

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

Java CPD (I) Frans Coenen Department of Computer Science

Elements of Advanced Java Programming

Java and J2EE (SCJA Exam CX ) 50 Cragwood Rd, Suite 350 South Plainfield, NJ 07080

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Japan Communication India Skill Development Center

Java from a C perspective. Plan

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

Report of the case study in Sistemi Distribuiti A simple Java RMI application

Quick Introduction to Java

Glassfish, JAVA EE, Servlets, JSP, EJB

Transcription:

An Overview of Java overview-1

Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

What is Java A Sun Microsystem Development (James Gosling) An effective OOP language Run-time environment (Interpreter w. GC and threads) Portable (architecture-neutral via Java Virtual Machine) java, javac, class library, tools, documentation Designed for easy Web/Internet applications Widespread acceptance overview-3

Java Products From Sun Micro Systems and other companies: SDK or JDK (Software Development Kit) JVM, compiler, interpreter, JFC, JavaDoc, Jdb, AppletViewer... Java Plug-in for browsers to run applets JavaBeans reusable Java component API Java IDEs integrated development environments JavaOS compact os for running Java programs Server side Servelet, JSP, JDBC, Application Web server Many, many other tools and applications. overview-4

Java Language Features Platform independence Totally Object-oriented, but simpler than C++ Dynamic incremental loading and linking Automatic GC Multithreaded Systematic class, package, and source file naming GUI and graphics programming Web and network applications support Internationalization (programs in Unicode) overview-5

Java Virtual Machine Compact JVM interprets bytecode, does GC Written in C, has OS/platform layer Uses threads Has just-in-time compilation JVM has simple instruction set Bytecode register based, byte order independent Easy to generate machine code overview-6

The Java Language Easy to learn: similar to C++ Packages and interfaces Strings and arrays as objects Classes as objects No: structs, unions, typedefs operator overloading pointer arithmetic or -> preprocessor or header files un-attached functions implementation-dependent features overview-7

inline, register, const, friend, or multiple base classes need to free memory or recompile on different platforms overview-8

Java Primitive Data Types Primitive Type Description boolean true or false char 16-bit Unicode character byte signed 8-bit integer short signed 16-bit integer int signed 32-bit integer long signed 64-bit integer float 32-bit floating point (IEEE 754-1985) double 64-bit floating point (IEEE 754-1985) overview-9

A First Java Program /////// File: Average.java /////// public class Average { public static void main(string[] args) { int i = 11, j = 20; double a = (i + j)/2.0; System.out.println("i is " + i + " and j is " + j); System.out.println("Average is " + a); } } overview-10

Compile and Run javac Average.java: produces Average.class java Average: to run Use CLASSPATH environment variable to locate class code java returns exit code not main. neptune:{57}java Average i is 11 and j is 20 Average is 15.5 overview-11

Robustness No implicit declarations Automatic GC Link-time type checks No pointer manipulations Array and string objects overview-12

Java Exceptions import java.io.*; class Lowercase { public static void main(string[] args) throws IOException { int i; char c; while ( (i = System.in.read())!= -1 ) { c = Character.toLowerCase( (char) i); System.out.print(c); } } } overview-13

Web Application overview-14

Web Application: applets Java code can supply executable content in Web documents Java-enabled Web browsers can execute such contents The Sun Java-Plugin supports applets for popular browsers The <applet> </applet> HTML tags Simple applet tag is similar to the img tag <applet code="filename.class" width="100" height="40"> <applet code="filename.class" codebase="url"... <param name="name" value="value"> overview-15

Java Class Libraries java.lang core language support java.io and javax.nio I/O streams java.net and java.rmi networking and remote method invocation support java.math support for big numbers java.awt and javax.swing cross-platform windowing toolkits java.text support for international text strings, dates, and numbers. java.util generic containers and other utilities API documentation in HTML. overview-16

Java Supports GUI Programming JFC (Java Foundation Classes) supplies GUI components: Buttons, Canvases Checkboxes, Choices Dialogs Frames Labels Lists Menus, Scrollbars Text areas overview-17

Java Supports Networking The java.net package supplies networking tools: URL object helps URL parsing, URL document reading (normal InputStream reading, via openstream method) URLConnection object allows I/O to an HTTP-server. Socket objects makes socket-based networking easier. In addition, RMI enables remote object invocation and servlets support web servers. overview-18

Threads in Java Java uses and allows multi-threaded programs Thread class and Runnable interface Mutual Exclusion via synchronized methods Synchronization via wait and notify overview-19

Java Documentation Available for browsing on the Web or download to your own computer Demos, tutorials, guides to topics description of Java tools Application Programming Interface (API) specification: 1. all packages 2. all classes, interfaces, and exceptions within a package 3. all member constructors, methods, and fields within a class overview-20