SlideShare una empresa de Scribd logo
1 de 22
 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.
2
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 andThreads .
8. Program Using applets and swings .
3
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 ProgrammingWith JAVA
 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
 James Gosling - Sun Microsystems
 Co founder –Vinod Khosla
 Oak - Java, May 20, 1995, SunWorld
 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)
 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.
 A general-purpose object-oriented language.
 Write Once Run Anywhere (WORA).
 Designed for easyWeb/Internet applications.
 Widespread acceptance.
 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.
 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.
 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.
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.
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.
 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 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.
17
JAVA Program Execution
18
 Edit Plus Software:
 EditPlus is a 32-bit text editor for the
MicrosoftWindows 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).
19
20
21
22

Más contenido relacionado

La actualidad más candente

Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
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 technologies explained to non-technical audience
Java technologies explained to non-technical audienceJava technologies explained to non-technical audience
Java technologies explained to non-technical audienceSteinn 'Stan' Jónsson
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
computer science JAVA ppt
computer science JAVA pptcomputer science JAVA ppt
computer science JAVA pptbrijesh kumar
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus CourseTOPS Technologies
 
Object Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingObject Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingAndiNurkholis1
 
Important features of java
Important features of javaImportant features of java
Important features of javaAL- AMIN
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?NexSoftsys
 

La actualidad más candente (20)

Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
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
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
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 technologies explained to non-technical audience
Java technologies explained to non-technical audienceJava technologies explained to non-technical audience
Java technologies explained to non-technical audience
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
computer science JAVA ppt
computer science JAVA pptcomputer science JAVA ppt
computer science JAVA ppt
 
Java project
Java projectJava project
Java project
 
Features of java
Features of javaFeatures of java
Features of java
 
Java seminar
Java seminarJava seminar
Java seminar
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus Course
 
core java
core javacore java
core java
 
Object Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingObject Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java Programming
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
 
Important features of java
Important features of javaImportant features of java
Important features of java
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
Core java course syllabus
Core java course syllabusCore java course syllabus
Core java course syllabus
 

Similar a Introduction to Object Oriented Programming in Java

java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free DownloadTIB Academy
 
Introduction to java
Introduction to java Introduction to java
Introduction to java sanjay joshi
 
Java Introduction
Java IntroductionJava Introduction
Java Introductionjaveed_mhd
 
Java Basics
Java BasicsJava Basics
Java BasicsKhan625
 
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 javeed_mhd
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Phaniu
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basicseleksdev
 
Java basics at Lara Technologies
Java basics at Lara TechnologiesJava basics at Lara Technologies
Java basics at Lara Technologieslaratechnologies
 
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
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 

Similar a Introduction to Object Oriented Programming in Java (20)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free Download
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Java Basics
Java BasicsJava Basics
Java Basics
 
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
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Java basic
Java basicJava basic
Java basic
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
 
OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
 
Java basics at Lara Technologies
Java basics at Lara TechnologiesJava basics at Lara Technologies
Java basics at Lara Technologies
 
DAY_1.1.pptx
DAY_1.1.pptxDAY_1.1.pptx
DAY_1.1.pptx
 
Java Notes .pdf
Java Notes .pdfJava Notes .pdf
Java Notes .pdf
 
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
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 

Más de sanjay joshi

Array in c language
Array in c languageArray in c language
Array in c languagesanjay joshi
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming languagesanjay joshi
 
Static and dynamic polymorphism
Static and dynamic polymorphismStatic and dynamic polymorphism
Static and dynamic polymorphismsanjay joshi
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming languagesanjay joshi
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheetssanjay joshi
 
Data Structure And Queue
Data Structure And Queue Data Structure And Queue
Data Structure And Queue sanjay joshi
 
Static and dynamic polymorphism
Static and dynamic polymorphismStatic and dynamic polymorphism
Static and dynamic polymorphismsanjay joshi
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 

Más de sanjay joshi (20)

Ccna security
Ccna security Ccna security
Ccna security
 
Array in c language
Array in c languageArray in c language
Array in c language
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Static and dynamic polymorphism
Static and dynamic polymorphismStatic and dynamic polymorphism
Static and dynamic polymorphism
 
Embeded system
Embeded systemEmbeded system
Embeded system
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Vb and asp.net
Vb and asp.netVb and asp.net
Vb and asp.net
 
Angular js
Angular jsAngular js
Angular js
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
 
Oops in php
Oops in phpOops in php
Oops in php
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Css3 responsive
Css3 responsive Css3 responsive
Css3 responsive
 
Html ppt
Html pptHtml ppt
Html ppt
 
Java script
Java scriptJava script
Java script
 
Data Structure And Queue
Data Structure And Queue Data Structure And Queue
Data Structure And Queue
 
Static and dynamic polymorphism
Static and dynamic polymorphismStatic and dynamic polymorphism
Static and dynamic polymorphism
 
Angularjs
AngularjsAngularjs
Angularjs
 
Visual basic
Visual basicVisual basic
Visual basic
 
Distributed database
Distributed databaseDistributed database
Distributed database
 

Último

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 

Último (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 

Introduction to Object Oriented Programming in Java

  • 1.
  • 2.  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. 2
  • 3. 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 andThreads . 8. Program Using applets and swings . 3
  • 4. 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 ProgrammingWith JAVA
  • 5.
  • 6.  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
  • 7.  James Gosling - Sun Microsystems  Co founder –Vinod Khosla  Oak - Java, May 20, 1995, SunWorld  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)
  • 8.  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.
  • 9.  A general-purpose object-oriented language.  Write Once Run Anywhere (WORA).  Designed for easyWeb/Internet applications.  Widespread acceptance.
  • 10.  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.
  • 11.  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.
  • 12.  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.
  • 13. 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.
  • 14. 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.
  • 15.  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
  • 16.  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.
  • 18. 18
  • 19.  Edit Plus Software:  EditPlus is a 32-bit text editor for the MicrosoftWindows 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). 19
  • 20. 20
  • 21. 21
  • 22. 22