What is the object-oriented relationship between BufferedReader and Reader?
BufferedReader IS-A Reader
class
The blueprint from which individual objects are created
Object
The root of the class hierarchy. Every class has the object as a superclass. All objects, including arrays, implement the methods of this class
instance variable
Variables within a class but outside any method. These variables are initialized when the class is instantiated.
Instance variables can be accessed from inside any method, constructor or block of that particular class
Subclass
Inherits all the public and protected members of its parent, no matter what package the subclass is in.
If the subclass is in the same package as its parent, it also inherits the package-private members of parent
Primitive vs reference types
Primitive types are basic types of data
Reference types are instantiable class as well as arrays
Java API
Package
Basics of inheritance in Java
Public
Can be accessed from any other class
Private
Polymorphism
Deals with how the program decides which methods it should use, depending on what type of thing it has. That is the ability to treat objects of different types in a similar manner.
Inheritance
When a ‘class’ derives from an existing ‘class’. For example, say we have a Person class, and when our student class inherits from Person class, meaning that student class carries all the public behavior and attributes that a person has.
Interfaces
Used as the parameter type of one or more methods in the class that solve the problem
Overloading
Deals with the idea of having two or more methods in the same class with the same name but different arguments
Override
A method with same name and same parameter exist in both superclass and subclass. Method override can be used to rewrites the functionality of the method is given by superclass, and customize it for its own usage
Static
A member of the class that isn’t associated with an instance of a class. Instead, the member belongs to the class itself. In other words, you don’t need to create an instance in order to use the variable
Protocol
HTTP
Hyper Text Transfer Protocol, it allows World Wide Web users to transfer information like image, text. It’s used to access HTML pages