Object Oriented Programming in

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.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
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.
Object Orientated Programming
IC211 Object Oriented Programming Overview of Java.
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.
For more Lectures and Notes Visit
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
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.
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.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Java program.
Java Introduction 劉登榮 Deng-Rung Liu 87/7/15. Outline 4 History 4 Why Java? 4 Java Concept 4 Java in Real World 4 Language Overview 4 Java Performance!?
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
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.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
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.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Java: An Overview John R Durrett Texas Tech University.
Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of.
Java Example Presentation of a Language. Background Conception: Java began as a language for embedded processors in consumer electronics, such as VCR,
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
introductory lecture on java programming
Java – in context Main Features From Sun Microsystems ‘White Paper’
CPSC Developed by a team lead by James Gosling from Sun Microsystems – 1995 WORA (write once, run anywhere) – it is cross platform – no recompiling.
1 Introduction to Java. 2 * 10% Assignments/ class participation * 10% Pop Quizzes * 05% Attendance * 25% Mid Term * 50% Final Term.
Introduction to JAVA Programming
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Sachin Malhotra Saurabh Choudhary
Java™ 2 Platform Getting Started.
Before You Begin Nahla Abuel-ola /WIT.
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Chapter 1 Introduction to Computers, Programs, and Java
Chapter No. : 1 Introduction to Java.
The Java Programming Language
Internet and Java Foundations, Programming and Practice
Java programming lecture one
Introduction Enosis Learning.
PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented.
Introduction Enosis Learning.
Getting Started ARCS Lab..
Advanced Programming Fall 2017.
Chapter 1 Introduction to Computers, Programs, and Java
Units with – James tedder
Units with – James tedder
(Computer fundamental Lab)
Java History, Editions, Version Features
By Rajanikanth B Overview Of Java By Rajanikanth B
CSC 142 Introduction to Java [Reading: chapters 1 & 2]
Java Evolution Java History. Java Features.
M S COLLEGE ART’S, COMM., SCI. & BMS
មជ្ឈមណ្ឌលកូរ៉េ សហ្វវែរ អេច អ ឌី
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:

Object Oriented Programming in

Why Java is Important ? Two reasons : Trouble with C/C++ language is that they are not portable and are not platform independent languages. Emergence of World Wide Web, which demanded portable programs Portability and security necessitated the invention of Java

History JDK Evolutions James Gosling - Sun Microsystems Co founder – Vinod Khosla JDK Evolutions JDK 1.0 (January 23, 1996) JDK 1.1 (February 19, 1997) J2SE 1.2 (December 8, 1998) J2SE 1.3 (May 8, 2000) J2SE 1.4 (February 6, 2002) J2SE 5.0 (September 30, 2004) Java SE 6 (December 11, 2006) Java SE 7 (July 28, 2011)

Continued... Java Editions. J2SE(Java 2 Standard Edition) - to develop client-side standalone applications or applets. J2ME(Java 2 Micro Edition ) - to develop applications for mobile devices such as cell phones. J2EE(Java 2 Enterprise Edition ) - to develop server-side applications such as Java servlets and Java Server Pages.

What is java ? A general-purpose object-oriented language. Write Once Run Anywhere (WORA). Designed for easy Web/Internet applications. Widespread acceptance.

How is Java different from C… C Language: Major difference is that C is a structure oriented language and Java is an object oriented language and has mechanism to define classes and objects. Java does not support an explicit pointer type Java does not have preprocessor, so we cant use #define, #include and #ifdef statements. Java does not include structures, unions and enum data types. Java does not include keywords like goto, size of and typedef. Java adds labeled break and continue statements. Java adds many features required for object oriented programming.

How is Java different from C++… C++ language Features removed in java: Java doesn’t support pointers to avoid unauthorized access of memory locations. Java does not include structures, unions and enum data types. Java does not support operator over loading. Preprocessor plays less important role in C++ and so eliminated entirely in java. Java does not perform automatic type conversions that result in loss of precision.

Continued… Java does not support global variables. Every method and variable is declared within a class and forms part of that class. Java does not allow default arguments. Java does not support inheritance of multiple super classes by a sub class (i.e., multiple inheritance). This is accomplished by using ‘interface’ concept. It is not possible to declare unsigned integers in java. In java objects are passed by reference only. In C++ objects may be passed by value or reference.

Continued … New features added in Java: Multithreading, that allows two or more pieces of the same program to execute concurrently. C++ has a set of library functions that use a common header file. But java replaces it with its own set of API classes. It adds packages and interfaces. Java supports automatic garbage collection. break and continue statements have been enhanced in java to accept labels as targets. The use of unicode characters ensures portability.

Continued … Features that differ: Though C++ and java supports Boolean data type, C++ takes any nonzero value as true and zero as false. True and false in java are predefined literals that are values for a boolean expression. Java has replaced the destructor function with a finalize() function. C++ supports exception handling that is similar to java's. However, in C++ there is no requirement that a thrown exception be caught.

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

Java Environment Java includes many development tools, classes and methods. Development tools are part of Java Development Kit (JDK) and The classes and methods are part of Java Standard Library (JSL), also known as Application Programming Interface (API). JDK constitutes of tools like java compiler, java interpreter and many. API includes hundreds of classes and methods grouped into several packages according to their functionality.

JAVA Program Execution

WORA(Write Once Run Anywhere)

JDK JDK is an acronym for Java Development Kit. It physically exists. It contains JRE + development tools.

Java Virtual Machine (JVM) Java Source Code Java Compiler Byte Code JVM (Intel) Intel/ Windows PC (Sun) SPARC/ Solaris Workstation Other Architectures Supporting JVM

Java Virtual Machine (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. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent. The JVM performs following main tasks: Loads code Verifies code Executes code Provides runtime environment

Java Runtime Environment (JRE) JRE is an acronym for Java Runtime Environment. It is used to provide runtime environment. It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses. Class loader & byte code verifier Java class libraries awt io net ... JVM Interpreter JIT Garbage Collector Threads and Synchronization

Java Native Interface (JNI) Per-thread JNI data structure Pointer JNI Interface Array of pointers to JNI functions ... Native method C Language Function

Hello world Program in java

Execution of Hello world Program

You can find us at queries@thesisscientist.com Thank you You can find us at queries@thesisscientist.com