Category: Java

Access modifiers

Access modifiers

In java, there are 4 types of access modifiers which are as follows. Public Private default protected We check their accessibility at 4 levels which are. Class level Subclass level Its own Package level...

Object class in java

Object class in java

The Object class, in the java.lang package, is the topmost class in java bydefault. In other words, it is the root of all the class hierarchy. You can use this class as reference of any...

Main method in java

Main method in java

In java, one might be wondering how to set a trigger point for execution  in an application. Answer would be you require to have a main method in your application. A main method signature is...

Static keyword

Static keyword

static  keyword s mainly used for memory management. It can be used with variables, method,blocks and  nested class. The static keyword belongs to the class, not to the object of the class. It can...

Constructor in java

Constructor in java

Constructor is an interesting concept in java. A constructor is used to initialize the object. In other words, a constructor is invoked when we create any object.A constructor initializes the data for the object. Rules...

Packages

Packages

Package in java is nothing but a kind of directory which contains a group of similar types of classes, interfaces and subpackages. Packages can be created by right click on the src folder and select...

Methods and return value

Methods and return value

Programming is considered good if it contains reusable components. By making reusable components, there will be less no. of line of code, code will look better, you don’t have to write the same functionality...

Object and Classes

Object and Classes

Object: As explained earlier in the post OOPs concept, Object can be defined as what we see around us in real world like car, pen, TV etc. It can be a physical and logical...

Naming convention in Java

Naming convention in Java

In java, when we assign name to identifiers such as class, package,method,variables etc. ,there are certain conditions which should be followed.It is not mandatory, but right way to do that. It improves the readability...

OOPs concepts in java

OOPs concepts in java

In this post, we will study about the OOPs concepts i.e. Objects oriented programming concepts. As per its name, first question comes to the mind is what is an object? What is an Object?...