A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

Reference Data Types

Reference DataTypes in Java

What are the Reference DataTypes in java ?

Reference data types in java:

  • Reference variables are created using defined constructors of the classes.

  • They are used to access objects.

  • These variables are declared to be of a specific type that cannot be changed.



For example, Employee, Puppy etc.

Class objects and various type of array variables come under reference data type. The default value of any reference variable is null.

A reference variable can be used to refer to any object of the declared type or any compatible type.
Example : Animal animal = new Animal("giraffe");

LEARN TUTORIALS

.

.