Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
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.
Introduction to Java Kiyeol Ryu Java Programming Language.
Introduction to Java Programming, 4E
For more Lectures and Notes Visit
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.
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Lecture 1 An Introduction to Computer, Programming and Java 1.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
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.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
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.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs,
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.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
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-
© 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.
Introduction to Java Programming with Forte Y. Daniel Liang.
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.
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.
Java and its Evolution. Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
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: รัฐภูมิ เถื่อนถนอม
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.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
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
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
1 Introduction to Java. 2 * 10% Assignments/ class participation * 10% Pop Quizzes * 05% Attendance * 25% Mid Term * 50% Final Term.
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.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction.
Introduction to JAVA Programming
Introduction to Java Programming, 4E Y. Daniel Liang.
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.
Object Oriented Programming in
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
GC101 Introduction to computer and program
Chapter 1 Introduction to Computers, Programs, and Java
Introduction Enosis Learning.
Introduction Enosis Learning.
Chapter 1 Introduction to Computers, Programs, and Java
Getting Started ARCS Lab..
Advanced Programming Fall 2017.
Chapter 1 Introduction to Computers, Programs, and Java
(Computer fundamental Lab)
Java History, Editions, Version Features
Chap 1. Getting Started Objectives
Presentation transcript:

Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology – JVM, JRE, API, JDK, IDE, bytecode Writing, Compiling and Executing Java Program

Outline of the Presentation Overview of Java History of Java Java Standards Editions of Java JDK and IDE Characteristics of Java Sample Java Program Creating, Compiling and Executing Java Program Java Runtime Environment (JRE) and Java Virtual Machine (JVM)

Overview of Java  A general-purpose Object-Oriented language  Developed by Sun Microsystems, later acquired by Oracle Corporation  Java can be used to develop Stand alone applications Web applications. applications for hand-held devices such as cell phones

History of Java  Developed by a team led by James Gosling at Sun Microsystems in 1991 for use in embedded chips.  Originally called Oak.  In 1995 redesigned for developing Internet applications and renamed as Java  HotJava - The first Java-enabled Web browser (1995)  JDK Evolutions (in slide 9)

Java Standards Computer languages have strict rules of usage. Java standards are defined by The Java language specification and Java API The Java language specification is a technical definition of the language that includes the syntax and semantics of the Java programming language. The Application Program Interface (API) contains predefined classes and interfaces for developing Java programs. Java language specification is stable, but the API is still expanding

Editions of Java Java Standard Edition (SE) used to develop client-side standalone applications or applets. Java Enterprise Edition (EE) used to develop server-side applications such as Java servlets and Java ServerPages. Java Micro Edition (ME). used to develop applications for mobile devices such as cell phones. We will be using Java SE

Java Development Kit (JDK) JDK consists of a set of separate programs, each invoked from a command line, for developing and testing Java programs. There are many versions of Java SE. JDK 1.02 (1995) JDK 1.1 (1996) Java 2 SDK v 1.2 (JDK 1.2, 1998) Java 2 SDK v 1.3 (JDK 1.3, 2000) Java 2 SDK v 1.4 (JDK 1.4, 2002) and so on… The latest is JDK1.10 We will be using JDK1.8

Integrated Development Environment (IDE) Besides JDK, a Java development tool—software that provides an integrated development environment (IDE) for rapidly developing Java programs can be used. Editing, compiling, building, debugging, and online help are integrated in one graphical user interface. Borland Jbuilder Microsoft Visual J++ Net Beans Eclipse BlueJ We will be using JDK1.8

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

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 Java is partially modeled on C++, but greatly simplified and improved

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 Java is inherently object-oriented. Object-oriented programming provides great flexibility, modularity, clarity, and reusability through encapsulation, inheritance, and polymorphism

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 Distributed computing involves several computers working together on a network. Java is designed to make distributed computing easy.

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 You need an interpreter to run Java programs. The programs are compiled into the Java Virtual Machine code called bytecode. The bytecode is machine-independent and can run on any machine that has a Java interpreter, which is part of the Java Virtual Machine (JVM).

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 Java compilers can detect many problems that would first show up at execution time in other languages. Java has eliminated certain types of error-prone programming constructs found in other languages. Java has a runtime exception-handling feature to provide programming support for robustness.

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 Java implements several security mechanisms to protect your system against harm caused by stray programs.

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 Write once, run anywhere With a Java Virtual Machine (JVM), you can write one program that will run on any platform.

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 Because Java is architecture neutral, Java programs are portable. They can be run on any platform without being recompiled.

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 Java’s performance Because Java is architecture neutral, Java programs are portable. They can be run on any platform without being recompiled.

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 Multithread programming is smoothly integrated in Java, whereas in other languages you have to call procedures specific to the operating system to enable multithreading.

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 Java was designed to adapt to an evolving environment. New code can be loaded on the fly without recompilation. There is no need for developers to create, and for users to install, major new software versions. New features can be incorporated transparently as needed.

Understanding JDK, JRE and JVM

Understanding JDK & JRE JDK  JDK is an acronym for Java Development Kit.  It physically exists. It contains JRE and development tools. JRE  JRE is an acronym for Java Runtime Environment.  It is the implementation of JVM and used to provide runtime environment.  It contains set of libraries and other files that JVM uses at runtime.

Understanding JVM  JVM (Java Virtual Machine) is an abstract machine.  It is a specification that provides runtime environment in which java byte code can be executed.  JVMs are available for many hardware and software platforms.  The JVM performs following main tasks: Loads code Verifies code Executes code Provides runtime environment

Internal Architecture of JVM

How Java is Platform-independent?

 The source code (program) written in java is saved as a file with.java extension.  The java compiler “javac” compiles the source code and produces the platform independent intermediate code called BYTE CODE. It is a highly optimized set of instructions designed to be executed by the JVM.

How Java is Platform-independent?  The byte code is not native to any platform because java compiler doesn’t interact with the local platform while generating byte code.  It means that the Byte code generated on Windows is same as the byte code generated on Linux for the same java code.  The Byte code generated by the compiler would be saved as a file with.class extension. As it is not generated for any platform, can’t be directly executed on any CPU.

Java Libraries, Middle-ware, and Database options  java.lang  java.util  java.sql  java.io  java.nio  java.awt  javax.swing

Sample Java Program import java.lang.*; // Optional public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); }

Creating, Compiling and Executing Java Program Use any text editor or IDE to create and edit a Java source-code file The source file must end with the extension.java and must have exactly the same name as the public class name Welcome.java Compile the.java file into java byte code file (Java bytecode is the instruction set of the Java virtual machine) javac Welcome.java If there are no syntax errors, the compiler generates a bytecode file with.class extension Run the byte code - java Welcome

Creating, Compiling and Executing Java Program