View on GitHub

Coding Practice

Java and Object-Oriented Programming

Index

Table of Contents

OOP Concepts

Abstraction

Classes, abstract classes, inheritance all abstract the complete details of the members of it.

Encapsulation

Wrapping up of data under a single unit. For example, we declare all instance variables as private and access a few of the, using setters and getters.

Inheritance

Classes are made reusable and they can have parent child relationships.

Polymorphism

One item taking multiple forms is called polymorphism. For example method overloading and overriding.

Reflection

Java memory management

Java Interview Questions

Multithreading

Can you access private members (methods and fields) of an object from outside the class?

Yes, we can access them using Java reflection API. Check this GeeksforGeeks article to understand how to do it.

Does HashMap allow null key?

Yes, one null key.

What are differences between abstract class and interface?