Skip to main content

ALL ABOUT JAVA



Object-oriented programming (OOPs) is a methodology that simplifies software development and maintenance by providing some rules.

Basic concepts of OOPs are

1.  OBJECTS: An object is an instance of a class. A class is a template or blueprint from which objects are created. So, an object is the instance(result) of a class.

2. CLASS: A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. It is a logical entity. It can't be physical.

A class in Java can contain:

Fields

Methods

Constructors

Blocks

Nested class and interface

3. INHERITANCE: Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming systems).

The idea behind inheritance in Java is that you can create new classes that are built upon existing classes. When you inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can add new methods and fields in your current class also.

Inheritance represents the IS-A relationship which is also known as a parent-child relationship.

4. POLYMORPHISM: Polymorphism in Java is a concept by which we can perform a single action in different ways. Polymorphism is derived from 2 greek words: poly and morphs. The word "poly" means many and "morphs" means forms. So polymorphism means many forms.

There are two types of polymorphism in Java: compile-time polymorphism and runtime polymorphism. We can perform polymorphism in java by method overloading and method overriding.

5. ABSTRACTION: Abstraction is a process of hiding the implementation details and showing only functionality to the user.

6. ENCAPSULATION: Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule that is mixed with several medicines. Encapsulation in java We can create a fully encapsulated class in Java by making all the data members of the class private. Now we can use setter and getter methods to set and get the data in it. The Java Bean class is an example of a fully encapsulated class.

Comments

Popular posts from this blog

English: ch- VALUE by kendel hippolyte

  B 1. Which two phrases in the poem tell us that the poet is recalling childhood memories? Answer: The 1st and the last phrases recall childhood memories. 2. How do we know that the customers at Ma Branch's shop were mostly poor? Answer: Most of the customers get their household chores and pay the money later to the shopkeepers. They are maintaining diaries. On that basis, we can say that most of the customers are poor. 3. Where did Ma Branch position herself? Answer: We consider that Ma Branch was a good shopkeeping store. The behavior of the seller was quite comfortable with the customer. Therefore during later years Ma Branch has improved and consequently shifted to Super Market. 4. Why do you think the poet said no one ever took her for granted? Answer: Both the lady sellers were genuine and workaholics. They used to sell their shops product with the accurate amount and weight without spending more time. They got this habit by day-to-day practicing. That's why customers li...

HISTORY PROJECT: THE REVOLT OF 1857

THE REVOLT OF 1857   KEY POINTS TO INCLUDE:- 1. Index 2. Introduction 3. Causes 4. Main Leaders  5. Consequences 6. Conclusion GO TO THE LINK BELOW https://www.schoollearningresources.com/PDF/_Revolt_of_1857.pdf https://mu.ac.in/wp-content/uploads/2014/04/FYBA-History-Paper-I-History-of-Modern-India-Revised-Syllabus-2018-19.pdf