Java – a term that distinguishes between “default” and “makeup” classes in OOP

ArrayLists, buffer readers, scanners, etc All default classes that already exist in the language

Unlike the public class withoftable, it is a "constituent" class that "does not exist in the language"

Why are there no terms to distinguish these ideas in teaching? Although I have been here for three years, I have hardly found this difference in college

Solution

In fact, there is a big difference between what you call "default" and "makeup" classes, which is related to their package names

All "default" classes are in some Java* Package (Java. Lang, Java. Util, etc.), and there is no "make up" class. You can use the package name starting with Java

As for the fact that this distinction is vague in "teaching", my feeling is that it is intentional As a language, Java is almost a set of keywords and syntax rules, plus a Java that no one can avoid extending Lang. object class (and it uses some other built-in types, such as string, integer and some exceptions)

JDK is a Java library that can help you deal with the most common use cases, but there are better alternatives in some cases

In my opinion, teaching a person Java util. Calendar or Java util. Logging has any advantage over jodatime or slf4j, just because they are wrong in the classpath by default

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>