What is the difference between public, protected, and private in Java?

In this tutorial, we will learn What is the difference between public, protected, and private in Java? as all these are access modifier that decides the accessibility i different situations and conditions where we can use them all are defined used there access modifiers. What are Access Modifiers?   Access Modifiers are the keywords that limit … Read more

What Does The ‘Static’ Keyword Do In A Class?

In this tutorial, we will learn What Does The ‘Static’ Keyword Do In A Class? in java, the Static keyword is generally used for memory management where the keyword is used to share the same variable or method of a given class in java. Static Keyword It is a non-access modifier in java where we … Read more

How to Inherit The Properties Of One Class To Another Class In Java?

We will learn How to Inherit The Properties Of One Class To Another Class In Java? where one class inherited the property of another using the keyword Extends which inherited all the properties of the parent class to the child class. Inheritance Just like its literal meaning inheritance means getting the properties of one(Parents) to … Read more

How To Print Odd And Even Numbers Using Different Classes In Java Program?

Here we will discuss How To Print Odd And Even Numbers Using Different Classes In Java Programs where we can use one class to find all odd the elements in one class and the rest of all will be even so print the rest of all at different places which will be called as even. … Read more

Why Do We Use Nested Classes In Java?

Here we will discuss Why We Use Nested Classes In Java? where the nested class is used for increasing the encapsulation and increase the readability of code or program. And as we know that to declare the class as static we need to have the class as a nested class.   Nested Class Nested classes … Read more

%d bloggers like this: