What is reference type data type? - ICSE Java Expert

Breaking

ICSE Java Expert

Learn Java for school

Unordered List

WELCOME

Monday, August 06, 2018

What is reference type data type?



Definition:
The reference type data type is used to refer to an object of any class.
The reference type data type are also called as user-defined data type or derived data type.

Example:
Class, Array, Interface etc.

Discussion:
A class is also called as user-defined data type because the structure of the class is defined by the user according to the requirement of the program.
A class is also called as derived data type because the structure of the class is derived from the primitive data type.

Size and range:

Syntax:
Class Student
{
    int roll;
    String name;
    float marks;
}

Program:

Video:





No comments:

Post a Comment