SlideShare a Scribd company logo
Java Fundamentals
Topics to be covered
 Difference between object-oriented programming and
procedural programming
 Advantages of OOP
 Introduction to Java
 Building a Java class
Object-Oriented Programming (OOP) vs.
Top-Down (Procedural) Programming
 OO approach
 System is defined as a collection of objects that work
together to accomplish tasks
 Objects carry out actions when asked
 Each object maintains its own data
 Procedural approach
 System is defined as a set of procedures that interact
with data
 Data is maintained separately from procedures
Java fundamentals 2
Advantages of Object-Oriented
System Development
 Objects are more natural
 Reuse
 Classes and objects can be invented once and used many
times during analysis, design, and programming
 Do not need source code for reused class, simply need to
know interface
Java fundamentals 2
Introducing Java
 Released mid 1995 by Sun Microsystems
 Designed to be:
 A powerful, full-featured, pure OO development
language
 Easy to learn - syntax is similar to C++
 Platform independent
 Support development of applications for networked
environment
 Ideal for Web-based applications
Introducing Java
 Powerful
 Class library
 Hundreds of prewritten classes
 Provide methods to accomplish various tasks
 OO
 Implements OO concepts described in Ch. 1
 Encourages good software design
 Reduces debugging and maintenance
Introducing Java
 Portability
 Programs can be written and compiled once, then run
on different platforms
 Important for internet applications (applets)
 Achieved by using:
 Bytecode
 Produced when a Java program is compiled
 Interpreter (Java Virtual Machine – JVM)
 Execution environment for bytecode on each platform
Building a Java Class
 Each source code file defines a class
 Class
 Hello.class
 File
 Hello.java
 Class header
 Describes class contained in source code file
 Keywords:
 public
 Indicates class has public availability
 class
 Indicates line of code is a class header
Building a Java Class
 Identifiers
 Name of a class, method, or variable
 Can be any length
 Can include any character except a space
 Must begin with a letter of the alphabet, a dollar sign ($), or
the underscore (_) character
 Java is case sensitive
 Public isn’t the same as public
 Block of code
 Used to group statements
 Delineated by open curly brace ({) and closed curly
brace (})
 All code in Java is enclosed in a single block of code,
which can contain additional blocks
Ad

More Related Content

What's hot (20)

java training in jaipur|java training|core java training|java training compa...
 java training in jaipur|java training|core java training|java training compa... java training in jaipur|java training|core java training|java training compa...
java training in jaipur|java training|core java training|java training compa...
infojaipurinfo Jaipur
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
Madishetty Prathibha
 
Java features
Java  features Java  features
Java features
Madishetty Prathibha
 
computer science JAVA ppt
computer science JAVA pptcomputer science JAVA ppt
computer science JAVA ppt
brijesh kumar
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
Tushar Chauhan
 
Java
JavaJava
Java
Harry Potter
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Debasish Pratihari
 
Java PPT
Java PPTJava PPT
Java PPT
Dilip Kr. Jangir
 
Advantages of java
Advantages of javaAdvantages of java
Advantages of java
xxx007008
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
Fraz Bakhsh
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat Shahriyar
Abir Mohammad
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
DhanalakshmiVelusamy1
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
Saravanakumar R
 
Features of java - javatportal
Features of java - javatportalFeatures of java - javatportal
Features of java - javatportal
JavaTportal
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
vivek shah
 
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
 
C sharp
C sharpC sharp
C sharp
Ahmed Vic
 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
Ajeet Kumar Verma
 
Java trainingcourse(1)
Java trainingcourse(1)Java trainingcourse(1)
Java trainingcourse(1)
Mahadi Hasan
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
RubaNagarajan
 

Similar to Java fundamentals 2 (20)

Java1
Java1Java1
Java1
computertuitions
 
Java
Java Java
Java
computertuitions
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)
Ankit Gupta
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
Object Oriented Programming unit 1 content for students
Object Oriented Programming unit 1 content for studentsObject Oriented Programming unit 1 content for students
Object Oriented Programming unit 1 content for students
ASHASITTeaching
 
java oops compilation object class inheritance.pptx
java oops compilation object class inheritance.pptxjava oops compilation object class inheritance.pptx
java oops compilation object class inheritance.pptx
CHERUKURIYUVARAJU209
 
java oops and java very important for .pptx
java oops and java very important for .pptxjava oops and java very important for .pptx
java oops and java very important for .pptx
cherukuriyuvaraju9
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
siragezeynu
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
vmadan89
 
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdfPJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
projectfora2
 
Unit 1 – Introduction to Java- (Shilpa R).pptx
Unit 1 – Introduction to Java- (Shilpa R).pptxUnit 1 – Introduction to Java- (Shilpa R).pptx
Unit 1 – Introduction to Java- (Shilpa R).pptx
shilpar780389
 
Java_presesntation.ppt
Java_presesntation.pptJava_presesntation.ppt
Java_presesntation.ppt
VGaneshKarthikeyan
 
Java notes jkuat it
Java notes jkuat itJava notes jkuat it
Java notes jkuat it
Arc Keepers Solutions
 
Java notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esectionJava notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esection
Arc Keepers Solutions
 
Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016
Manuel Fomitescu
 
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
SuganthiDPSGRKCW
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Veerabadra Badra
 
Core java
Core javaCore java
Core java
sharad soni
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)
Ankit Gupta
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
Object Oriented Programming unit 1 content for students
Object Oriented Programming unit 1 content for studentsObject Oriented Programming unit 1 content for students
Object Oriented Programming unit 1 content for students
ASHASITTeaching
 
java oops compilation object class inheritance.pptx
java oops compilation object class inheritance.pptxjava oops compilation object class inheritance.pptx
java oops compilation object class inheritance.pptx
CHERUKURIYUVARAJU209
 
java oops and java very important for .pptx
java oops and java very important for .pptxjava oops and java very important for .pptx
java oops and java very important for .pptx
cherukuriyuvaraju9
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
vmadan89
 
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdfPJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
projectfora2
 
Unit 1 – Introduction to Java- (Shilpa R).pptx
Unit 1 – Introduction to Java- (Shilpa R).pptxUnit 1 – Introduction to Java- (Shilpa R).pptx
Unit 1 – Introduction to Java- (Shilpa R).pptx
shilpar780389
 
Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016
Manuel Fomitescu
 
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
SuganthiDPSGRKCW
 
Ad

Recently uploaded (20)

P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Ad

Java fundamentals 2

  • 2. Topics to be covered  Difference between object-oriented programming and procedural programming  Advantages of OOP  Introduction to Java  Building a Java class
  • 3. Object-Oriented Programming (OOP) vs. Top-Down (Procedural) Programming  OO approach  System is defined as a collection of objects that work together to accomplish tasks  Objects carry out actions when asked  Each object maintains its own data  Procedural approach  System is defined as a set of procedures that interact with data  Data is maintained separately from procedures
  • 5. Advantages of Object-Oriented System Development  Objects are more natural  Reuse  Classes and objects can be invented once and used many times during analysis, design, and programming  Do not need source code for reused class, simply need to know interface
  • 7. Introducing Java  Released mid 1995 by Sun Microsystems  Designed to be:  A powerful, full-featured, pure OO development language  Easy to learn - syntax is similar to C++  Platform independent  Support development of applications for networked environment  Ideal for Web-based applications
  • 8. Introducing Java  Powerful  Class library  Hundreds of prewritten classes  Provide methods to accomplish various tasks  OO  Implements OO concepts described in Ch. 1  Encourages good software design  Reduces debugging and maintenance
  • 9. Introducing Java  Portability  Programs can be written and compiled once, then run on different platforms  Important for internet applications (applets)  Achieved by using:  Bytecode  Produced when a Java program is compiled  Interpreter (Java Virtual Machine – JVM)  Execution environment for bytecode on each platform
  • 10. Building a Java Class  Each source code file defines a class  Class  Hello.class  File  Hello.java  Class header  Describes class contained in source code file  Keywords:  public  Indicates class has public availability  class  Indicates line of code is a class header
  • 11. Building a Java Class  Identifiers  Name of a class, method, or variable  Can be any length  Can include any character except a space  Must begin with a letter of the alphabet, a dollar sign ($), or the underscore (_) character  Java is case sensitive  Public isn’t the same as public
  • 12.  Block of code  Used to group statements  Delineated by open curly brace ({) and closed curly brace (})  All code in Java is enclosed in a single block of code, which can contain additional blocks