Java, the reputable programming language that has come up with it new release of Java 21. This latest version brings new features, improvements, and some noteworthy deprecations as well. In this post, we’ll delve into the release of Java 21, examine the criticism it has received, broadly explore its features, take a peek at deprecated elements,…
Category: Java Core
What is the difference between Abstraction and Encapsulation in OOPS in Java?
Encapsulation and Abstraction are two fundamental concepts in Object-Oriented Programming (OOP) that help to promote modularity, reusability, and maintainability in code. In this blog post, we will explore the differences between encapsulation and abstraction in Java, as well as the steps and commands required to implement them. Encapsulation refers to the practice of hiding the implementation…
What is ‘static’ keyword in Java? Explained with example.
The static keyword in Java is used to indicate that a member (field or method) belongs to a class and not to an instance of the class. In other words, a static member is shared among all instances of a class and is not unique to any one instance. One of the most common examples of…
Abstraction in Java explained with example.
Abstraction in Java is the process of hiding the implementation details and exposing only the necessary information to the user. It is one of the core concepts of object-oriented programming and is used to create a simplified version of an object or class, allowing the user to interact with it in a more intuitive and user-friendly…
Polymorphism in Java explained with example.
Polymorphism in Java is the ability of an object to take on multiple forms. This means that an object can be treated as an instance of its parent class or any of its subclasses. In other words, polymorphism allows a single interface to be used for different types of objects. One of the most common examples…
Inheritence in Java explained with example.
Inheritance is a fundamental concept in object-oriented programming, and it is supported in Java through the use of the “extends” keyword. This feature allows developers to create new classes that inherit properties and methods from existing classes, making it easier to reuse code and build more complex systems. For example, let’s say we have a superclass…
Encapsulation in Java explained with example.
Encapsulation is a fundamental concept in the world of object-oriented programming (OOP) and is widely used in Java. It is the process of hiding the internal details of an object from the outside world. This helps to protect the data and behavior of an object from being modified by external sources, and ensures that the object’s…
Objects and Classes in Java explained.
Objects and classes are two fundamental concepts in the world of object-oriented programming (OOP). Understanding the differences and similarities between these two concepts is essential for anyone working with Java, one of the most widely used programming languages that is fully object-oriented. In this blog post, we will discuss the concepts of objects and classes in…
What are the Object Oriented programming (OOPs) concepts in Java?
Object-Oriented Programming (OOP) is a programming paradigm that is based on the concept of “objects” which can contain data and methods that operate on that data. Java, one of the most widely used programming languages, is fully object-oriented and supports all the concepts of OOP. In this blog post, we will be discussing some of the…
What is the difference between ‘final’ method, class and variable in Java? Explained with example.
Java’s final keyword is a modifier that can be applied to classes, methods, and variables. When applied to a class, it means that the class cannot be subclassed. When applied to a method, it means that the method cannot be overridden in a subclass. When applied to a variable, it means that the variable’s value cannot…