Java Language Fundamentals 5 Min Drill
Real-world objects share two characteristics i.e. state and behavior
An object is a software bundle of related state and behavior.
An object stores its state in fields/variables and exposes its behavior through methods/functions.
Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication
Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation
A class is a blueprint or prototype from which objects are created.
Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.
Inheritance provides a powerful and natural mechanism for organizing and structuring your software.
Object-oriented programming allows classes to inherit commonly used state and behavior from other classes.
An interface is a contract between a class and the outside world.
Implementing an interface allows a class to become more formal about the behavior it promises to provide.
A collection of methods with no implementation is called an interface.
A namespace that organizes classes and interfaces by functionality is called a package.
If your class claims to implement an interface, all methods defined by that interface must appear in its
source code before the class will successfully compile.
When a class implements an interface, it promises to provide the behavior published by that interface.
A package is a namespace that organizes a set of related classes and interfaces.
The term API stands for Application Programming Interface