SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Object Oriented
Programming in JAVA
By Professional Guru
Introduction
• Welcome to the course Object Oriented
Programming in JAVA. This course will cover a
core set of computer science concepts needed
to create a modern software application using
Java.
9/15/2011 Object Oriented Programming using JAVA 2http://professional-guru.com
Course Objectives
On completion of this course we will be able to:
1. Identify the importance of Java .
2. Identify the additional features of Java compared to C++ .
3. Identify the difference between Compiler and Interpreter .
4. Identify the difference between applet and application .
5. Apply Object Oriented Principles of Encapsulations, Data
abstraction, Inheritance, Polymorphism.
6. Program using java API (Application Programming Interface).
7. Program using Exception Handling, Files and Threads .
8. Program Using applets and swings .
9/15/2011 Object Oriented Programming using JAVA 3http://professional-guru.com
Course Syllabus
9/15/2011 Object Oriented Programming using JAVA 4
UNIT CONCEPTS to be covered
UNIT-I JAVA Basics
UNIT-II Inheritance
UNIT-III Data structures creation and manipulation in java
UNIT-IV Exception Handling
UNIT-V GUI Programming With JAVA
http://professional-guru.com
JAVA Basics
http://professional-guru.com
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
http://professional-guru.com
History
• James Gosling - Sun Microsystems
• Co founder – Vinod Khosla
• Oak - Java, May 20, 1995, Sun World
• 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)
http://professional-guru.com
Cont..
• 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 ServerPages.
http://professional-guru.com
What is java?
• A general-purpose object-oriented language.
• Write Once Run Anywhere (WORA).
• Designed for easy Web/Internet applications.
• Widespread acceptance.
http://professional-guru.com
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, sizeof and typedef.
– Java adds labeled break and continue statements.
– Java adds many features required for object oriented
programming.
http://professional-guru.com
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.
http://professional-guru.com
Cont…
 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.
http://professional-guru.com
Cont …
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.
http://professional-guru.com
Cont …
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.
http://professional-guru.com
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
http://professional-guru.com
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.
http://professional-guru.com
Java is architecture-neutral
9/15/2011 Object Oriented Programming using JAVA 17
JAVA Program Execution
http://professional-guru.com
WORA(Write Once Run Anywhere)
9/15/2011 Object Oriented Programming using JAVA 18http://professional-guru.com
Editplus for Java Programming
• Edit Plus Software:
• EditPlus is a 32-bit text editor for the
Microsoft Windows operating system.
• The editor contains tools for programmers,
including syntax highlighting (and support for
custom syntax files), file type conversions, line
ending conversion (between Linux, Windows
and Mac styles), regular expressions for
search-and-replace, spell check etc).
9/15/2011 Object Oriented Programming using JAVA 19http://professional-guru.com
Hello world Program in java
9/15/2011 Object Oriented Programming using JAVA 20http://professional-guru.com
Execution of Hello world Program
9/15/2011 Object Oriented Programming using JAVA 21http://professional-guru.com
9/15/2011 Object Oriented Programming using JAVA 22http://professional-guru.com

Weitere ähnliche Inhalte

Was ist angesagt?

JAVA PPT by NAVEEN TOKAS
JAVA PPT by NAVEEN TOKASJAVA PPT by NAVEEN TOKAS
JAVA PPT by NAVEEN TOKASNAVEEN TOKAS
 
Introduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresIntroduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresAkash Badone
 
Java Introduction
Java IntroductionJava Introduction
Java Introductionjaveed_mhd
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for DesignersR. Sosa
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of javavinay arora
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Introduction to java
Introduction to java Introduction to java
Introduction to java sanjay joshi
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus CourseTOPS Technologies
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONAjit Yadav
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCRBTech
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core javaAisha Siddiqui
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free DownloadTIB Academy
 

Was ist angesagt? (20)

Introduction to java
Introduction to java Introduction to java
Introduction to java
 
JAVA PPT by NAVEEN TOKAS
JAVA PPT by NAVEEN TOKASJAVA PPT by NAVEEN TOKAS
JAVA PPT by NAVEEN TOKAS
 
Introduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresIntroduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their features
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Bn1005 demo ppt core java
Bn1005 demo ppt core javaBn1005 demo ppt core java
Bn1005 demo ppt core java
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java project
Java projectJava project
Java project
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus Course
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slides
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core java
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free Download
 

Ähnlich wie Introduction to Java

Java Basics in Mule
Java Basics in MuleJava Basics in Mule
Java Basics in MuleRajkattamuri
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Phaniu
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in MuleAnand kalla
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javasanjay joshi
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
Java basics at Lara Technologies
Java basics at Lara TechnologiesJava basics at Lara Technologies
Java basics at Lara Technologieslaratechnologies
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxSuganthiDPSGRKCW
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaLevent YILDIZ
 
Java programming language
Java programming languageJava programming language
Java programming languageSubhashKumar329
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
 
OOP with Java
OOP with JavaOOP with Java
OOP with JavaOmegaHub
 

Ähnlich wie Introduction to Java (20)

Java Basics in Mule
Java Basics in MuleJava Basics in Mule
Java Basics in Mule
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Java basics at Lara Technologies
Java basics at Lara TechnologiesJava basics at Lara Technologies
Java basics at Lara Technologies
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
 
java slides
java slidesjava slides
java slides
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Java programming language
Java programming languageJava programming language
Java programming language
 
Java basics at dallas technologies
Java basics at dallas technologiesJava basics at dallas technologies
Java basics at dallas technologies
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 

Mehr von Professional Guru (19)

introduction to AWs
introduction to AWsintroduction to AWs
introduction to AWs
 
introduction to AWs
introduction to AWsintroduction to AWs
introduction to AWs
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
introduction to DEVOPS
introduction to DEVOPSintroduction to DEVOPS
introduction to DEVOPS
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Dev ops concept
Dev ops conceptDev ops concept
Dev ops concept
 
Robotic Process Automation
Robotic Process AutomationRobotic Process Automation
Robotic Process Automation
 
Dev ops concept
Dev ops conceptDev ops concept
Dev ops concept
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
introduction to hadoop
introduction to hadoopintroduction to hadoop
introduction to hadoop
 
Introduction to SQL SERVER
Introduction to  SQL SERVERIntroduction to  SQL SERVER
Introduction to SQL SERVER
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Introduction to HTML
Introduction to HTML Introduction to HTML
Introduction to HTML
 
Rpa developer resume
Rpa developer resumeRpa developer resume
Rpa developer resume
 
ANDROID DEVELOPMENT DEMO
ANDROID DEVELOPMENT DEMOANDROID DEVELOPMENT DEMO
ANDROID DEVELOPMENT DEMO
 

Kürzlich hochgeladen

Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 

Kürzlich hochgeladen (20)

Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 

Introduction to Java

  • 1. Object Oriented Programming in JAVA By Professional Guru
  • 2. Introduction • Welcome to the course Object Oriented Programming in JAVA. This course will cover a core set of computer science concepts needed to create a modern software application using Java. 9/15/2011 Object Oriented Programming using JAVA 2http://professional-guru.com
  • 3. Course Objectives On completion of this course we will be able to: 1. Identify the importance of Java . 2. Identify the additional features of Java compared to C++ . 3. Identify the difference between Compiler and Interpreter . 4. Identify the difference between applet and application . 5. Apply Object Oriented Principles of Encapsulations, Data abstraction, Inheritance, Polymorphism. 6. Program using java API (Application Programming Interface). 7. Program using Exception Handling, Files and Threads . 8. Program Using applets and swings . 9/15/2011 Object Oriented Programming using JAVA 3http://professional-guru.com
  • 4. Course Syllabus 9/15/2011 Object Oriented Programming using JAVA 4 UNIT CONCEPTS to be covered UNIT-I JAVA Basics UNIT-II Inheritance UNIT-III Data structures creation and manipulation in java UNIT-IV Exception Handling UNIT-V GUI Programming With JAVA http://professional-guru.com
  • 6. 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 http://professional-guru.com
  • 7. History • James Gosling - Sun Microsystems • Co founder – Vinod Khosla • Oak - Java, May 20, 1995, Sun World • 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) http://professional-guru.com
  • 8. Cont.. • 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 ServerPages. http://professional-guru.com
  • 9. What is java? • A general-purpose object-oriented language. • Write Once Run Anywhere (WORA). • Designed for easy Web/Internet applications. • Widespread acceptance. http://professional-guru.com
  • 10. 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, sizeof and typedef. – Java adds labeled break and continue statements. – Java adds many features required for object oriented programming. http://professional-guru.com
  • 11. 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. http://professional-guru.com
  • 12. Cont…  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. http://professional-guru.com
  • 13. Cont … 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. http://professional-guru.com
  • 14. Cont … 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. http://professional-guru.com
  • 15. 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 http://professional-guru.com
  • 16. 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. http://professional-guru.com
  • 17. Java is architecture-neutral 9/15/2011 Object Oriented Programming using JAVA 17 JAVA Program Execution http://professional-guru.com
  • 18. WORA(Write Once Run Anywhere) 9/15/2011 Object Oriented Programming using JAVA 18http://professional-guru.com
  • 19. Editplus for Java Programming • Edit Plus Software: • EditPlus is a 32-bit text editor for the Microsoft Windows operating system. • The editor contains tools for programmers, including syntax highlighting (and support for custom syntax files), file type conversions, line ending conversion (between Linux, Windows and Mac styles), regular expressions for search-and-replace, spell check etc). 9/15/2011 Object Oriented Programming using JAVA 19http://professional-guru.com
  • 20. Hello world Program in java 9/15/2011 Object Oriented Programming using JAVA 20http://professional-guru.com
  • 21. Execution of Hello world Program 9/15/2011 Object Oriented Programming using JAVA 21http://professional-guru.com
  • 22. 9/15/2011 Object Oriented Programming using JAVA 22http://professional-guru.com