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.
Syntax:
Class Student
{
int roll;
String name;
float marks;
}
Program:
Video:
No comments:
Post a Comment