1 Introduction to Java and Applet Lecture 3 from Chapters 1 and 2 of the complete reference.

Slides:



Advertisements
Similar presentations
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Introduction to Java Kiyeol Ryu Java Programming Language.
JDK, Jan Pettersen Nytun - HiA 1 The Java Programming Environment: The programmer write source code with a text editor. The programmer write source code.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
1 Introduction to Java and Applet. 2 Download Java Compiler (1)
1 Chapter 3 Programs and Packages. 2 Java Virtual Machine (JVM) Java programs execute on the JVM. The JVM is a virtual rather than a physical machine,
JAVA ENVIRONMENT JDK, API, JVM. JAVA ENVIRONMENT  Java environment includes development tools and many classes and methods. Java Environment JDK (Java.
Introduction to the JDK Java for Computational Finance
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
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.
CSE 452: Programming Languages Java and its Evolution.
Introduction to Java Kumar Harshit. Objectives ( 목적지 ) At the end of the lesson, the student should be able to: ● Describe the features of Java technology.
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. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
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.
Introduction to Java. 2 Module Information Programming conceptsPrerequisites Beginners in JAVATarget Audience This module will provide you a solid grounding.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
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.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
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,
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
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-
POS 406 Java Technology And Beginning Java Code
Introduction to Java Programming with Forte Y. Daniel Liang.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
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.
Java and its Evolution. Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
1 The JAVA Language Object Oriented Technology Mithani Binjan M.
Introduction Mehdi Einali Advanced Programming in Java 1.
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.
introductory lecture on java programming
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Know Your Java. Java is special Java source code Byte code/ native code Object code on windows Object code on Dos Object code on Lynux.
การเขียนโปรแกรมภาษา จาวา Java Programming อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 1.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming 1 1 2Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
CMSC 202 Computer Science II for Majors Fall 2010 Introduction Version 9/101.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Chapter No. : 1 Introduction to Java.
Introduction to Advanced Java Programming
Advanced Programming Fall 2017.
(Computer fundamental Lab)
Java Evolution Java History. Java Features.
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:

1 Introduction to Java and Applet Lecture 3 from Chapters 1 and 2 of the complete reference

2 Java ’ s Lineage Java is related to C+. Java is a direct descendent of C. Java ’ s object-oriented features were influenced by C++ Java was developed by James Gosling etc. at Sun Mircosystems in It was called “ oak ” and was renamed as Java.

3 Java and the Internet Java is a portable, platform- independent language that could be used to produce code that would run on different platform. Java expands the universe of objects that can move freely in Cyberspace. It is ideal for client [windows]-server [linux] platform.

4 Java Applets Java supports two types of programs: applications and applets An application: It is a program that runs on our PC under windows XP. An applet: It is a tiny Java program, dynamically downloaded across the network, like music, video clip.

5 Security Without Java, Once you are downloading an executable program, there is a risk of viral infection. If it is written in Java using Java- compatible browser, it is pretty safe. Java also provides a “ firewall ” between a networked application and our PC to safe- guard information such as credit card number, bank account balance.

6 Java ’ s Merit- Interpreter and Bytecode Java that resolves security and portability problems is because the output of a Java Compiler is not executable code (not.exe or.com). It is bytecode. Bytecode is an optimised codes to be executed by the Java Run Time system. Java run-time system is an interpreter.

7 Java Overview – some key elements Simple: simple and easy to learn Object-oriented: Clean, usable approach to objects Robust: reliable under different operating environments across the networks (The Internet) Mutlithreaded: supports a few light weight processes Interpreted: Although it is an interpreted language, the performance is good.

8 Download Java Compiler (1)

9 Download Java Compiler (2)

10 Download Java SDK (3)

11 Installing Standard- Java 2 SDK

12 Installation - check whether you have installed java and javac

13 Set the path to include the directory Test it by typing javac in other directory

14 JDK components appletviewer.exeapplet viewer java.exeintepreter javac.execompiler javadoc.exe document generator javap.exedecompiler jdb.exedebugger

15 A simple Program – javac & java

16 Explanation to the first program

17 Explanation to the first program Class: First is the name of class. It will generate a First.class after compilation (javac) Public: is an access specifier that allows the programmer to control Main(): must be declared as public so that it can be accessed. String args[]: argv[0] is the first argument System.out.println: Display the contents followed by a line feed

18 Second Program

19 Second Program - Explanation int num; declares an integer valuable called num Num = 10; assign a value of 10 System.out.println("The value of num is " + num); The “ + ” causes the value of num to be displayed.println() ; displays the string passed.print(); display the string without line feed

20 Applet (1)

21 Applet (2) – the result

22 Explanation to Applet Prepare a java program called third In the HTML, specify the class of the program (third) Use appletviewer or IE explorer to see the result

23 Javadoc - Document Generator

24 Javadoc – some example

25 Javadoc.exe Javadoc is a tool shipped with JDK that generates HTML documentation from the comments in the class source files. With the aid of Javadoc we can simplify documentation of our code and make it a regular habit.

26 Javap – decompiler

27 Javap - explanation The javap command disassembles a class file. Its output depends on the options used. If no options are used, javap prints out the package.

28 Jdb – Debugger

29 Jdb - explanation The Java Debugger, jdb, is a simple command-line debugger for Java classes. It provides inspection and debugging of a local or remote Java Virtual Machine. Jdb class  format

30 Jdb – help

31 Summary Java is related to C+. Java is a direct descendent of C. Java ’ s object-oriented features were influenced by C++ It is ideal for client [windows]-server [Linux] platform.