Deepak

Deepak

Instance Variables in Java (with Examples)

Instance variables in Java

When you declare non-static data fields or variables within a class but outside any method, constructor, or block, they are called instance variables in Java. These variables are also called non-static variables in Java because they are not defined with…

Local Variables in Java

Variables that are declared inside a method, constructor, or block are called local variables in Java. They are accessible only within that scope in which they are defined. Therefore, the scope of these variables is limited to the block, method,…

Variables in Java

Java variables

In this tutorial, we will learn about variables in Java programming. A variable is a container in Java that holds data or value during the execution of a program. In other words, a variable is a named location in the…

Non-Primitive Data Types in Java

Non-primitive data types in Java

In the Java programming language, data types are broadly categorized into two groups: primitive data types and non-primitive data types. Non-primitive data types are those data types in Java that are used to store multiple values. These data types are…

Primitive Data Types in Java

Data types in Java

In this tutorial, we will learn about primitive data types in Java. A data type represents the type of data that a variable can hold. For example, you declare a variable like this: In the above declaration, there are three…

Hello World Program in Java

Java hello world program

The “Hello World!” program in Java or any other programming languages is the first and basic program that beginners write it. The main purpose of writing this program is to understand the basic syntax and structure of the program. Writing…

Structure of Java Program

Structure of Java program.

In this tutorial, you will learn about structure of Java program and its various components with the help of example. Basically, a Java program involves the following components: Documentation Section in Structure of Java Program Documentation is the first section…

New Keyword in Java

The new keyword is a reserved keyword in Java programming which is used to create a new object or instance of a class. It allocates memory on the heap for the object and returns a reference to that memory. The…

What is Object in Java (with Examples)

Java object

In this tutorial, we will learn about what is object in Java with the help of realtime examples. An object in Java is a named entity that encapsulates state (attributes) and behavior (methods). In other words, a real-world entiry that…