

Every Java class is an example of encapsulation. The encapsulation principle says hiding the data behind a method. If any component follows data hiding and abstraction, then the component is said to be encapsulated. The process of grouping/binding data members(variables) and corresponding methods into a single unit is called Encapsulation. which will make it easier and relatable to understand the following oops concept. If you are a beginner in Java programming I would recommend you to learn certain basics such as Class, Object, Method, Access Modifiers, Interface etc. Therefore, let’s begin with a discussion of the OOPs concept.

OOPs is at the core of Java, and hence it is best to understand its basic principles before you begin writing even simple Java programs. Object-Oriented Programming System (OOPs) is a programming concept that works on the principles of objects at the centre of your program. Object-Oriented Programming (OOPS) in Java ~ by Deepti Swain

Superclass (if any): The name of the class’s parent (superclass), if any, preceded by the keyword extends.Class name: The class name should begin with the initial letter capitalized by convention.Modifiers: A class can be public or have default access (Refer to this for details).But, let us start by learning about the different characteristics of an Object-Oriented Programming Language. Now that we have covered the basic prerequisites, we will move on to the 4 pillars of OOPs which are as follows. Message passing involves specifying the name of the object, the name of the function and the information to be sent. A message for an object is a request for execution of a procedure and therefore will invoke a function in the receiving object that generates the desired results. Message Passing : Objects communicate with one another by sending and receiving information to each other. Method body: It is the block of code, enclosed between braces, that you need to execute to perform your intended operations.Exception list: The exceptions you expect the method to throw.If there are no parameters, you must use empty parentheses (). Parameter list: Comma-separated list of the input parameters that are defined, preceded by their data type, within the enclosed parentheses.Method Name: The rules for field names apply to method names as well, but the convention is a little different.The return type: The data type of the value returned by the method or void if it does not return a value.default (declared/defined without using any modifier): Accessible within the same class and package within which its class is defined.private: Accessible only within the class in which it is defined.protected: Accessible within the package in which it is defined and in its subclass(es) (including subclasses declared outside the package).public: Accessible in all classes in your application.In Java, there are 4 types of access specifiers: from where it can be accessed in your application. Access Modifier: Defines the access type of the method i.e.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.DevOps Engineering - Planning to Production.Python Backend Development with Django(Live).
#Oops concepts in java android
Android App Development with Kotlin(Live).
#Oops concepts in java full
