Reference Data Types in Java Programming

January 30, 2014 , 1 Comments

Any type of storage that stores an address or we can say reference of object in memory, called Reference data type. Java like other language have also some reference data types discussed in the article.

Broadly a reference in Java is a data element whose value is an address of a memory location. Arrays (a group of similar data items), classes (a blue print of some entity e.g. a student) and interfaces are reference type. The value of reference type variable, in contrast to that of primitive type, is a reference to (an address of) the value or set of values represented by variables.

Reference Data Types in Java Programming

A reference is called a pointer, or memory address in other language. The java programming language does not support the explicit use of addresses like other languages do. You use variable’s name instead.

An importance reference type that you use in Java is String type. The String type lets you create variables that can hold textual data e.g. “Mohan”, TZ194”, “194ZB”, “234” etc. Anything that you enclose in double quotes is treated as text in Java.

Anil Swami

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

1 comment: