Browsing tag: oops

Abstract Class in Java

Abstract Class in Java


An abstract class’s purpose is to provide an appropriate super class from which other classes can inherit and thus share a common design. Abstract class would be created to share code among several closely related classes. All the sub-classes extend the abstract class would get all the common methods or fields available in the super

OOPS inheritance design pattern

Inheritance In Java


Object oriented programming(OOPS) paradigm enforces code re-usability and avoid redundant code. To implement the code re-usability, OOPS introduces the concept of inheritance. Let see the “Inheritance” definition, A class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is

private public protected in java class modifiers

public private protected access modifier in java


Having the door would not ensure safety for home.  Locking the door is important and ensures the safety of the home. The same analogy applicable for Java object oriented feature as well. Writing a class in java would not provide abstraction and encapsulation. We have to write the code by exposing only the required information

OOPS

Object Oriented Programming in Java


More number of developers are familiar and expert in procedural languages like C and Visual Basic.  We can develop the software solution by procedural languages, then why it is required to move to object oriented programming (OOPS)? Why OOPS has better industry reception than procedural languages? Finally why Java runs on billions on devices than