0

What are user-defined data types in Java?

variables declared using class type are user-defined. But I am not convinced with my answer. I feel class type is Reference data type/Object data type. As per there are two types: Primitive data types [int,float..etc]. Reference type/Object type[String str, user_defined_Class Obj1..etc] I did search on this, but couldn't get a proper answer. Kindly shed some light on this.

27th Aug 2019, 9:35 AM
SADIK_RIZVI
SADIK_RIZVI - avatar
1 Odpowiedź
0
nobody can define primitive types types declared in API are not called 'user defined', they are type of Object / reference type, eg ArrayList users can define user type of object by user defined class
27th Aug 2019, 10:45 AM
zemiak