Java programming part-2

Oops concept :-

The full name of OOP is object-oriented programming. Following are the OOPS concepts:-

Object

Class Encapsulation Abstraction inheritance Polymorphism Message Passing Object An object is an instance of a class that contains the actual value instead of the variable. An object is a basic runtime entity. In general, an object is anything that can be recognized. All the objects around us like:- Pen, book, chair, car, TV etc. are all objects.

Class A class is a group of objects of the same type. For example:-

Mango, Guava and Apple are all fruits, and they all became members of the class Fruit. A class is a user-defined data type and a class is a set of data and functions.

Encapsulation

Encapsulation is the integration of data and functions into a single unit. In this, the variables of the class are private and they cannot be accessed directly outside the class. Encapsulation is used as a class. In a class, we can put data and methods together as a unit. Java bean is completely an encapsulated class because all the data members in it are private.

Abstraction

Abstraction means to display only the essential information of the object and to keep the background information hidden. For example- When we drive a car, we know that when we press the accelerator, the speed will increase and when we press the brake, the car will stop. But we do not know why the car stops by pressing the brake. Similarly in OOPS complex things are hidden and only essential and simple things are shown. In Java, abstract class and interface are used to achieve abstraction.

inheritance

Inheritance means ‘inheritance’. In Java, inheriting the properties and methods of another class by one class is called inheritance. The class which is derived from another class is called subclass and the class from which the subclass is derived is called super class. We also call superclass as base class and subclass we also called derived class.

Polymorphism

Polymorphism is a word derived from the Greek language in which poly means many and morphism means forms. So polymorphism means many forms. Polymorphism is a concept in which we can do the same work in two different ways. There are two types of Polymorphism in Java which are as follows:- 1:- Compile-time polymorphism (static polymorphism) 2:- Run-time polymorphism (Dynamic polymorphism)

1:- Compile time polymorphism:- Compile time polymorphism is also called method overloading or early binding. This polymorphism means that we declare methods of the same name with different signatures because we can perform different tasks with the same method name.

2:- Run-time polymorphism:- This type of polymorphism is called late binding or dynamic binding or method overriding. This polymorphism means that we declare methods of the same name with the same signature.

Message

Passing Objects communicate among themselves by sending and receiving information to each other. Objects send and receive messages in the same way as we do. A message to an object is a request for a procedure and hence a method is invoked in the receiving object.

Advantage of OOP Its benefits are as follows:-

In this, the structure of the program is very simple, which reduces the complexity. We need to write the code only once in it and we can use it again and again. It provides data redundancy. In this, we can easily maintain the code, which saves time.

object-oriented

Data hiding and abstraction are used in programming, which makes security better in it. If debugging is to be done in it, it can be done easily.

My knowledge about java programming

History of Java:-

java is an object oriented programming language. Java was invented by James Gosling and his colleagues at Sun Microsystems in 1991. The real name of Jawa was Oak but later there was discussion about changing its name but it was not possible to decide any name, then Oak team went to drink coffee and they named Oak as Jawa.

Although Java is used only to develop applications, but it is used in all kinds of tasks in the Internet. In Java the source code is compiled into byte code whereas in other languages the source code is compiled into machine code.

Learn and earn

My name is v.k.chauhan and I am gonna tell about my qualifications today.

So I am 12 th pass student and I was thinking about my career what should I do now I don’t know what to do ahead but all we no that our country is also going digital now In a near future whole country will be digitalised so I just search for some courses like java, python, digital marketing etc. But I can’t effort this this course. But just some days before I got one site in wich all courses I got for free it is fully free of cost so anyone want to join that site for all courses for free in hindi language then here is a link

https://learnvern.page.link/R9FrFnUm5FvefWpN7