SlideShare una empresa de Scribd logo
1 de 42
Java Session 2
Contents…
Oops Concepts

Java features
Oops Concepts
•   Class
•   Object
•   Polymorphism
•   Inheritance
•   Encapsulation
•   Abstraction
OOP
Polymorphism
Polymorphism

• Polymorphism gives us the ultimate
  flexibility in extensibility. The ability to
  define more than one function with the
  same name is called Polymorphism.

• In java, c++ there are two type of
  polymorphism:
       compile time polymorphism (overloading)
       runtime polymorphism (overriding).
Polymorphism 1
Polymorphism 2
Polymorphism 3
Polymorphism 4
Polymorphism 5
Polymorphism 6
Polymorphism 7
Overloading
• Example of Overloading

       int add(int a,int b)
       float add(float a,int b)
       float add(int a ,float b)
        void add(float a)
        int add(int a)
        void add(int a) //error conflict with
                      the method int add(int a)
OverLoading
    Class BookDetails{

       String title;
       String publisher;
       float price;
          setBook(String title){ }
         setBook(String title, String publisher){}
         setBook(String title, String publisher,float


                                               price){ }
}
(overriding).
  class BookDetails{
         String title;
 setBook(String title){ }
  }


class ScienceBook extends BookDetails{
        setBook(String title){}              //overriding
        setBook(String title, String publisher,float price)
             { } //overloading
 }
Difference Between Java & C++

• In C++,
  Method Overloading is an example of Static Polymorphism
  Method Overriding is an example of Run time Polymorphism


• In Java, Method overloading and Method overriding
  can be achieved using
  static methods , final methods,private methods are
  examples of Static Polymorphism.
  Instance method is an ex of Runtime Polymorphism.
Inheritance
• Inheritance is the property which allows a
  Child class to inherit some properties from
  its parent class.

• In Java this is achieved by using extends
  keyword.

• Only properties with access modifier public
  and protected can be accessed in child
  class.
Inheritance
Inheritance 1
Inheritance 2
Inheritance 3
Inheritance 4
Inheritance
    public class Parent
       {
         public String parentName;
         public int parentage;
         public String familyName;
         }

    public class Child extends Parent
{
          public String childName;
          public int childAge;
          public void printMyName()
          {
          System.out.println(“ My name is “+ chidName+” “ +familyName);
          } }
Inheritance is the process by which object of one class
acquires the properties of another class.
Encapsulation
• Encapsulation means that all data members
  (fields) of a class are declared private.
  Some methods may be private, too.
• The class interacts with other classes
  (called the clients of this class) only
  through the class’s constructors and public
  methods.
• Constructors and public methods of a class
  serve as the interface to class’s clients.
Encapsulation
• Encapsulation is the mechanism that binds together code
  and the data if manipulates, and keeps both safe from
  outside interference and misuse.

•    One way to think about encapsulation is as a protective
    wrapper that prevents the code and data from being
    arbitrarily accessed by other code defined outside the
    wrapper.

• Access to the code and data inside the wrapper is tightly
  controlled through a well-defined interface. Conclusion:
  The wrapping up of data and methods into a single unit
  (called class) is known as encapsulation.
Abstraction
• Abstraction refers to the act of representing
  essential features without including the
  background details.

• hiding unnecessary data from the users and
  making the application as user friendly then it is
  called as abstrcation
        ex:Any mail account the user is simply
  filling the form and he don't know ho it is
  developed.
Difference Between Object-based Programming &
         Object-Oriented Programming

• Object Based Programming languages obeys all
  the features of OOPs except inheritence.
  Ex: Java Script,VB script.
• Object Oriented Programming languages obeys
  all the features of OOPs.
  Ex: C++,Java
Buzz Words
· Simple
· Secure
· Portable
· Object-oriented
· Robust
· Multithreaded
· Architecture-neutral
· Interpreted
· High performance
· Distributed
· Dynamic
Simple
•         Java is designed to be easy for the
    professional programmer to learn and use.
Secure
• secure – programs are confined to the Java
  execution environment and can not access
  other parts of the computer.
Secure




• Security problems like eavasdropping,
  Tampering and virus threats can be
  eliminated or minimized by using java on
  internet
Portable
• If a program yields the same result on every
  machine, then that program is called portable.
  Java programs are portable. This is the result of
  java’s system independent nature.
Object-oriented
• Java is pure Object oriented programming
  languages because it is satisfying oops
  features.

• Class, object, Abstraction, Inheritance,
  polymorphism, Encapsulation.
Robust
• Robust means Strong. Java programs are
  strong and they don’t crash easily like c
  and c++.
    why? Excellent Exception handling
          Memory Management
  Class loader sub system of JVM will
 allocate necessary memory for java
 program.
  Garbage Collector de allocates the
 memory
Multithreaded
• A thread represents an individual process
  to execute a group of statements. JVM uses
  several threads to execute different blocks
  of code. Creating multiple threads is called
  Multi threaded.
Compiled and Interpreted
• Java Programs are compiled to generate
  byte code.

• This byte code can be downloaded and
  interpreted by the interpreter in JVM.
High performance
• The problem with the interpreter is slow.
  To over come this problem, along with
  interpreter java soft people have
  introduced JIT (Just In Time) compiler.
• Which enhance the speed of execution.
Distributed
• Java is designed for the distributed
  environment of the Internet. Because it
  handles TCP/IP protocols

• Java supports RMI (Remote Method
  Invocation).

• This feature enables a programmer to
  invoke methods across the network.
Dynamic
• Before the development of java, only static
  texts used to be displayed in browser.

• Dynamic loading is possible using applet
  programming. Which are dynamically
  interacting programs on internet.
Thank you…




         to be contd…

Más contenido relacionado

La actualidad más candente

Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple Inheritanceadil raja
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introductionjyoti_lakhani
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
Java exception handling ppt
Java exception handling pptJava exception handling ppt
Java exception handling pptJavabynataraJ
 
Core Java
Core JavaCore Java
Core JavaNA
 
Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I Atif AbbAsi
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentationManav Prasad
 
Presentation on-exception-handling
Presentation on-exception-handlingPresentation on-exception-handling
Presentation on-exception-handlingNahian Ahmed
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsAnton Keks
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaTech_MX
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Luzan Baral
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1RubaNagarajan
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarAbir Mohammad
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesecosio GmbH
 

La actualidad más candente (20)

Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
 
Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple Inheritance
 
Java presentation
Java presentation Java presentation
Java presentation
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Java exception handling ppt
Java exception handling pptJava exception handling ppt
Java exception handling ppt
 
Core Java
Core JavaCore Java
Core Java
 
Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I Introduction to Koltin for Android Part I
Introduction to Koltin for Android Part I
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Presentation on-exception-handling
Presentation on-exception-handlingPresentation on-exception-handling
Presentation on-exception-handling
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat Shahriyar
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examples
 

Destacado

Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Javawiradikusuma
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwordsramesh517
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceJava OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceOUM SAOKOSAL
 
Brain Computer Interface.ppt
Brain Computer Interface.pptBrain Computer Interface.ppt
Brain Computer Interface.pptAmal Sanjay
 
20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right nowSocial Bubble
 

Destacado (20)

Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
Oop java
Oop javaOop java
Oop java
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
OOP java
OOP javaOOP java
OOP java
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
01 introduction to oop and java
01 introduction to oop and java01 introduction to oop and java
01 introduction to oop and java
 
Introduction to java and oop
Introduction to java and oopIntroduction to java and oop
Introduction to java and oop
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceJava OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
 
Brain Computer Interface.ppt
Brain Computer Interface.pptBrain Computer Interface.ppt
Brain Computer Interface.ppt
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Core java oop
Core java oopCore java oop
Core java oop
 
20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now
 

Similar a Java OOP s concepts and buzzwords

Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentalsAnsgarMary
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP conceptsAhmed Farag
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programmingAmar Jukuntla
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptxmadan r
 
Top 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedTop 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedGaurav Maheshwari
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedyearninginjava
 
A Case Study on Java. Java Presentation
A Case Study on Java. Java Presentation A Case Study on Java. Java Presentation
A Case Study on Java. Java Presentation Ayush Gupta
 
Core Java interview questions-ppt
Core Java interview questions-pptCore Java interview questions-ppt
Core Java interview questions-pptMayank Kumar
 
Core java lessons
Core java lessonsCore java lessons
Core java lessonsvivek shah
 
Java-Intro.pptx
Java-Intro.pptxJava-Intro.pptx
Java-Intro.pptxVijalJain3
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)smumbahelp
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for seleniumapoorvams
 
full defination of final opp.pptx
full defination of final opp.pptxfull defination of final opp.pptx
full defination of final opp.pptxrayanbabur
 

Similar a Java OOP s concepts and buzzwords (20)

CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 
Top 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedTop 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experienced
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experienced
 
A Case Study on Java. Java Presentation
A Case Study on Java. Java Presentation A Case Study on Java. Java Presentation
A Case Study on Java. Java Presentation
 
Core Java interview questions-ppt
Core Java interview questions-pptCore Java interview questions-ppt
Core Java interview questions-ppt
 
Cse java
Cse javaCse java
Cse java
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
Java-Intro.pptx
Java-Intro.pptxJava-Intro.pptx
Java-Intro.pptx
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)
 
Java programming and security
Java programming and securityJava programming and security
Java programming and security
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 
full defination of final opp.pptx
full defination of final opp.pptxfull defination of final opp.pptx
full defination of final opp.pptx
 

Más de Raja Sekhar

Exception handling
Exception handlingException handling
Exception handlingRaja Sekhar
 
Java multi threading
Java multi threadingJava multi threading
Java multi threadingRaja Sekhar
 
String handling session 5
String handling session 5String handling session 5
String handling session 5Raja Sekhar
 
java Basic Programming Needs
java Basic Programming Needsjava Basic Programming Needs
java Basic Programming NeedsRaja Sekhar
 
Class object method constructors in java
Class object method constructors in javaClass object method constructors in java
Class object method constructors in javaRaja Sekhar
 

Más de Raja Sekhar (7)

Exception handling
Exception handlingException handling
Exception handling
 
Java multi threading
Java multi threadingJava multi threading
Java multi threading
 
Java packages
Java packagesJava packages
Java packages
 
String handling session 5
String handling session 5String handling session 5
String handling session 5
 
java Basic Programming Needs
java Basic Programming Needsjava Basic Programming Needs
java Basic Programming Needs
 
Class object method constructors in java
Class object method constructors in javaClass object method constructors in java
Class object method constructors in java
 
Java Starting
Java StartingJava Starting
Java Starting
 

Último

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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Último (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Java OOP s concepts and buzzwords

  • 3. Oops Concepts • Class • Object • Polymorphism • Inheritance • Encapsulation • Abstraction
  • 4. OOP
  • 6. Polymorphism • Polymorphism gives us the ultimate flexibility in extensibility. The ability to define more than one function with the same name is called Polymorphism. • In java, c++ there are two type of polymorphism: compile time polymorphism (overloading) runtime polymorphism (overriding).
  • 14. Overloading • Example of Overloading int add(int a,int b) float add(float a,int b) float add(int a ,float b) void add(float a) int add(int a) void add(int a) //error conflict with the method int add(int a)
  • 15. OverLoading Class BookDetails{ String title; String publisher; float price; setBook(String title){ } setBook(String title, String publisher){} setBook(String title, String publisher,float price){ } }
  • 16. (overriding). class BookDetails{ String title; setBook(String title){ } } class ScienceBook extends BookDetails{ setBook(String title){} //overriding setBook(String title, String publisher,float price) { } //overloading }
  • 17. Difference Between Java & C++ • In C++, Method Overloading is an example of Static Polymorphism Method Overriding is an example of Run time Polymorphism • In Java, Method overloading and Method overriding can be achieved using static methods , final methods,private methods are examples of Static Polymorphism. Instance method is an ex of Runtime Polymorphism.
  • 18. Inheritance • Inheritance is the property which allows a Child class to inherit some properties from its parent class. • In Java this is achieved by using extends keyword. • Only properties with access modifier public and protected can be accessed in child class.
  • 24. Inheritance public class Parent { public String parentName; public int parentage; public String familyName; } public class Child extends Parent { public String childName; public int childAge; public void printMyName() { System.out.println(“ My name is “+ chidName+” “ +familyName); } }
  • 25. Inheritance is the process by which object of one class acquires the properties of another class.
  • 26. Encapsulation • Encapsulation means that all data members (fields) of a class are declared private. Some methods may be private, too. • The class interacts with other classes (called the clients of this class) only through the class’s constructors and public methods. • Constructors and public methods of a class serve as the interface to class’s clients.
  • 27. Encapsulation • Encapsulation is the mechanism that binds together code and the data if manipulates, and keeps both safe from outside interference and misuse. • One way to think about encapsulation is as a protective wrapper that prevents the code and data from being arbitrarily accessed by other code defined outside the wrapper. • Access to the code and data inside the wrapper is tightly controlled through a well-defined interface. Conclusion: The wrapping up of data and methods into a single unit (called class) is known as encapsulation.
  • 28. Abstraction • Abstraction refers to the act of representing essential features without including the background details. • hiding unnecessary data from the users and making the application as user friendly then it is called as abstrcation ex:Any mail account the user is simply filling the form and he don't know ho it is developed.
  • 29. Difference Between Object-based Programming & Object-Oriented Programming • Object Based Programming languages obeys all the features of OOPs except inheritence. Ex: Java Script,VB script. • Object Oriented Programming languages obeys all the features of OOPs. Ex: C++,Java
  • 30. Buzz Words · Simple · Secure · Portable · Object-oriented · Robust · Multithreaded · Architecture-neutral · Interpreted · High performance · Distributed · Dynamic
  • 31. Simple • Java is designed to be easy for the professional programmer to learn and use.
  • 32. Secure • secure – programs are confined to the Java execution environment and can not access other parts of the computer.
  • 33. Secure • Security problems like eavasdropping, Tampering and virus threats can be eliminated or minimized by using java on internet
  • 34. Portable • If a program yields the same result on every machine, then that program is called portable. Java programs are portable. This is the result of java’s system independent nature.
  • 35. Object-oriented • Java is pure Object oriented programming languages because it is satisfying oops features. • Class, object, Abstraction, Inheritance, polymorphism, Encapsulation.
  • 36. Robust • Robust means Strong. Java programs are strong and they don’t crash easily like c and c++. why? Excellent Exception handling Memory Management  Class loader sub system of JVM will allocate necessary memory for java program.  Garbage Collector de allocates the memory
  • 37. Multithreaded • A thread represents an individual process to execute a group of statements. JVM uses several threads to execute different blocks of code. Creating multiple threads is called Multi threaded.
  • 38. Compiled and Interpreted • Java Programs are compiled to generate byte code. • This byte code can be downloaded and interpreted by the interpreter in JVM.
  • 39. High performance • The problem with the interpreter is slow. To over come this problem, along with interpreter java soft people have introduced JIT (Just In Time) compiler. • Which enhance the speed of execution.
  • 40. Distributed • Java is designed for the distributed environment of the Internet. Because it handles TCP/IP protocols • Java supports RMI (Remote Method Invocation). • This feature enables a programmer to invoke methods across the network.
  • 41. Dynamic • Before the development of java, only static texts used to be displayed in browser. • Dynamic loading is possible using applet programming. Which are dynamically interacting programs on internet.
  • 42. Thank you… to be contd…