InterviewSolution
Saved Bookmarks
| 1. |
Why is a class called a user defined data type |
|
Answer» Answer: Object oriented programming allows us to MODEL real world objects. User-defined classes COMBINE the data and methods as integrated components. Java language uses some pre-defined data TYPES such as int, FLOAT and char. These data types are also KNOWN as composite data type, which provide some preliminary facilities in Java programming. Similarly, a user may create a data type and declare certain characteristics and behaviour within it. This can be done by using a class. This is the reason why a class is referred as user defined data type.
|
|