Core Java
StringBuffer And StringBuilder Class
As we know that strings are immutable and cannot be modified, to overcome this we got another classes called 'StringBuilder' and 'StringBuffer' which represents strings in such a way that their data can be modified. Their class objects are mutable, and there are methods provided in this class which directly manipulate the data inside the object.
Classes And Objects
A class is a model or blueprint for creating objects which means that the properties (variables) and actions (methods) of the objects are written in the class. The same variables and methods are available in the objects because they are created from the class
Methods in Java
A method represents a group of statements that performs a task, here task represents a calculation or processing of data or generating a report, etc.
Inheritance
It is possible to acquire all the members of a class and use them in another class by relating the objects of the two classes. This is possible by using inheritance concept. In other words inheritance is deriving new classes from existing classes such that the new classes acquire all the features of existing classes.
Polymorphism
Polymorphism came from the two greek words 'poly' meaning many and 'morphos' meaning forms. The ability to exist in different forms is called 'polymorphism'. In java, a variable, an object or a method can exist in different forms, thus performing various tasks depending on the context. As the same variable or method can perform different tasks, the programmer has the advantage of writing flexible code.