answersLogoWhite

0


Best Answer

A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed.

Ex:

ArrayList lst = new ArrayList();

The above line creates a reference variable lst which refers to an ArrayList object

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is reference data types in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the differences between C and Java reference variables?

Java does not have the concept of Reference Variables. We cannot access the memory location where the data is stored in Java.


Is built-in data-type are abstract data-types in java?

All built-in data types are not abstract data types.


Does java supports unsigned data types?

No, in Java, only signed numbers are defined.


What is the hierarchy of the java program?

define the data types


Variables as object in java?

There are two main categories of variables in Java. They are primitive and non primitive. Primitive data types are the basic data types like int, float, char etc. These are not objects. The other non primitive data types are all types of Java Objects. Example: String, ArrayList etc.


Why java called as strong type language?

That means that Java is fairly strict about data types.


How does java pass primitive types and objects?

Java uses only pass by value. Primitive data types are passed purely as pass by value whereas for objects a value which is the reference to the object is passed. Hence the whole object is not passed but its reference gets passed. All modifications to the object in the method would modify the object in the Heap.


How many simple data types are there?

There are a total of 8 simple or primitive data types in Java. They are:byteshortintfloatdoublebooleanlong andString


Why pass by reference is quicker than pass by values in java?

Pass by Reference does not create a copy of the data items. So, it is faster.


Is Java a true object oriented language?

since Java have primitive data types, I think its not pure OO


What are the three types of master data discussed in this exercise?

The three types of master data discussed are reference data and enterprise data. Lastly, there is also market master data.


What are the only types in Java that are not classes?

The non-class Java data types are primitives: * byte * short * int * long * float * double * boolean * char