SlideShare a Scribd company logo
1 of 22
Object Oriented
Programming in
JAVA
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.
Object Oriented Programming
using JAVA 2
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 .
Object Oriented Programming
using JAVA 3
Course Syllabus
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
JAVA Basics
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
 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)
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.
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, sizeof
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.
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.
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.
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.
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 is architecture-neutral
Object Oriented Programming
using JAVA 17
JAVA Program Execution
WORA(Write Once Run
Anywhere)
Object Oriented Programming
using JAVA 18
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).
Object Oriented Programming
using JAVA 19
Hello world Program in java
Object Oriented Programming
using JAVA 20
Execution of Hello world Program
Object Oriented Programming
using JAVA 21
Object Oriented Programming
using JAVA 22

More Related Content

What's hot

Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in MuleAnand kalla
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of javavinay arora
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1RubaNagarajan
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for DesignersR. Sosa
 
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
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarAbir Mohammad
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free DownloadTIB Academy
 
Java Introduction
Java IntroductionJava Introduction
Java Introductionjaveed_mhd
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
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
 
Introduction to java
Introduction to java Introduction to java
Introduction to java sanjay joshi
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONAjit Yadav
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 

What's hot (19)

Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
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
 
Spring presentation
Spring presentationSpring presentation
Spring presentation
 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
 
Intro to Java
Intro to JavaIntro to Java
Intro to Java
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat Shahriyar
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free Download
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
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
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 

Viewers also liked

IFRS Implementation and How the Banks should Approach It.
IFRS Implementation and How the Banks should Approach It.IFRS Implementation and How the Banks should Approach It.
IFRS Implementation and How the Banks should Approach It.JAMES OKARIMIA
 
презентация Microsoft office power point
презентация Microsoft office power pointпрезентация Microsoft office power point
презентация Microsoft office power pointvikaevp
 
Documentacion final
Documentacion finalDocumentacion final
Documentacion finalYosh Loyola
 
Practica evaluacion
Practica   evaluacionPractica   evaluacion
Practica evaluacionSan Amir
 
Google docs
Google docs Google docs
Google docs andypeso
 
Normaa apa camila
Normaa apa camilaNormaa apa camila
Normaa apa camilaCamiLi2
 
Pressemitteilungen 2.0
Pressemitteilungen 2.0Pressemitteilungen 2.0
Pressemitteilungen 2.0ADENION GmbH
 
Presentación de ejercicio exposición en el mnc
Presentación de ejercicio exposición en el mncPresentación de ejercicio exposición en el mnc
Presentación de ejercicio exposición en el mncSilvia Loza
 

Viewers also liked (14)

IFRS Implementation and How the Banks should Approach It.
IFRS Implementation and How the Banks should Approach It.IFRS Implementation and How the Banks should Approach It.
IFRS Implementation and How the Banks should Approach It.
 
Elevation
ElevationElevation
Elevation
 
презентация Microsoft office power point
презентация Microsoft office power pointпрезентация Microsoft office power point
презентация Microsoft office power point
 
Documentacion final
Documentacion finalDocumentacion final
Documentacion final
 
Practica evaluacion
Practica   evaluacionPractica   evaluacion
Practica evaluacion
 
Google docs
Google docs Google docs
Google docs
 
Normaa apa camila
Normaa apa camilaNormaa apa camila
Normaa apa camila
 
Pressemitteilungen 2.0
Pressemitteilungen 2.0Pressemitteilungen 2.0
Pressemitteilungen 2.0
 
Presentación de ejercicio exposición en el mnc
Presentación de ejercicio exposición en el mncPresentación de ejercicio exposición en el mnc
Presentación de ejercicio exposición en el mnc
 
Mi autobiografi a 1
Mi autobiografi a 1Mi autobiografi a 1
Mi autobiografi a 1
 
Entrevista con esmeralda bravo
Entrevista con esmeralda bravoEntrevista con esmeralda bravo
Entrevista con esmeralda bravo
 
Sasi
SasiSasi
Sasi
 
Document32.1
Document32.1Document32.1
Document32.1
 
P ineda
P inedaP ineda
P ineda
 

Similar to Introduction to java

Similar to Introduction to java (20)

Introduction to java
Introduction to java Introduction to java
Introduction to java
 
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 JavaIntroduction 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
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
 
Java basics at Lara Technologies
Java basics at Lara TechnologiesJava basics at Lara Technologies
Java basics at Lara Technologies
 
Java seminar
Java seminarJava seminar
Java seminar
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
java slides
java slidesjava slides
java slides
 
Java basic
Java basicJava basic
Java basic
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
 
OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
 
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
 

More from princeirfancivil (20)

Web services uddi
Web services uddiWeb services uddi
Web services uddi
 
Web services wsdl
Web services wsdlWeb services wsdl
Web services wsdl
 
Web services SOAP
Web services SOAPWeb services SOAP
Web services SOAP
 
WebServices introduction
WebServices introductionWebServices introduction
WebServices introduction
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-III
 
Maven II
Maven IIMaven II
Maven II
 
Maven part 1
Maven part 1Maven part 1
Maven part 1
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
Data weave
Data weave Data weave
Data weave
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
 
Mmc
MmcMmc
Mmc
 
Mmc
MmcMmc
Mmc
 
Mmc 2
Mmc 2Mmc 2
Mmc 2
 
Mule esb api layer
Mule esb api layerMule esb api layer
Mule esb api layer
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Introduction to java

  • 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. Object Oriented Programming using JAVA 2
  • 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 . Object Oriented Programming using JAVA 3
  • 4. Course Syllabus 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
  • 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
  • 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)
  • 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.
  • 9. What is java?  A general-purpose object-oriented language.  Write Once Run Anywhere (WORA).  Designed for easy Web/Internet applications.  Widespread acceptance.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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
  • 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.
  • 17. Java is architecture-neutral Object Oriented Programming using JAVA 17 JAVA Program Execution
  • 18. WORA(Write Once Run Anywhere) Object Oriented Programming using JAVA 18
  • 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). Object Oriented Programming using JAVA 19
  • 20. Hello world Program in java Object Oriented Programming using JAVA 20
  • 21. Execution of Hello world Program Object Oriented Programming using JAVA 21