Can every class be referred to as a user-defined datatype?
Short Answer
Views 48
Answer:
-
If the class is written by you (the programmer) → Yes, it is a user-defined datatype.
-
If the class is part of the Java API (like
String,ArrayList,Scanner) → No, these are pre-defined datatypes (though still reference/composite types).
đ In short:
-
Every class=a reference type.
-
If programmer creates it → user-defined.
-
If Java provides it → pre-defined.
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.