I. Interpretation 1
Use the keyword abstract in C # To define abstract classes and abstract methods.
Classes that cannot be initialized are called abstract classes. They only provide partial implementation, but the other class can inherit it and
Reprinted from http://hi.baidu.com/sjjqaa2010/blog/item/963bd13e0cdcadf33c6d974a.html
I. abstract classes
(1) abstract methods are declared only, but do not contain implementations. They can be considered as virtual methods without
C #:
I. abstract class:Abstract classes are special classes, but they cannot be instantiated. In addition, they have other characteristics of the class. It is important that abstract classes can include abstract methods, which are not supported
Java defines some methods that do not contain the method body, the implementation of the method body to the subclass of the class according to their own circumstances to implement, such a method is an abstract modified method of abstraction,
JAVA interface and abstract class, JAVA interface abstract class
For object-oriented programming, abstraction is one of its major features. In Java, OOP abstraction can be embodied in two forms: interfaces and abstract classes.
I. abstract class
If
If a class is not associated with a specific thing, but simply expresses an abstract concept, just as a base class for its derived class, such a class is an abstract class, and when you declare a method in an abstract class, it is an abstract method
Directory:
[C # tips] C # some confusing concepts -------- data type storage location, method call, out and ref Parameters
[C # tips] C # some confusing concepts (ii) -------- constructor, this keyword, partial classification, enumeration [C #
1) When inheriting an abstract class, each of the abstract methods in the class must be overridden, and each implemented method must receive the same number and type of parameters as the method specified in the abstract class, with the same return
(i) overviewIn the Java language, abstract classes and interface are the two mechanisms that support the definition of an abstraction class. It is precisely because of the existence of these two mechanismsIn order to give Java a powerful
(Source http://hi.baidu.com/dgx_lsyd3/blog/item/8f710ed7ca49badda144dfd0.html)
---------------------------------------------Explanation 1:Abstract class and interface are two mechanisms supported for the definition of abstract classes in Java. It
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.