Notes
8: Interface (interface) with internal class (inner class)
Interface (interface) can be imagined as a "pure" abstract class. Allows the developer to define the form of the class: The method name, the argument list, the type of the return
1. An abstract class can have a non-abstract method, and all the abstract methods of the parent class must be implemented in the subclass of the abstract, with at least one empty method body.2. Interface is a special abstract class, the method in
In the previous section of the study, the emphasis on inheritance in general needs to move upward when necessary to play, or should be used cautiously;Transition up and bindAn upward transformation is a subclass that transforms into a base class,
· Morethanonelogger: normally only one logger is used in each class.
Translate more than one logger: Generally, one logger is only used in one class.
· Loggerisnotstaticfinal: In most cases, the logger can be declared static and final.
Logger
The Java language provides an interface mechanism. This interface makes Java object-oriented programming more flexible. We can use interfaces to define the expression of a class, but interfaces cannot contain any implementations. In the book
Java notes
Java SE: Java Standard Edition for table-level application and database development;
Java EE: Java Enterprise Edition for enterprise-level development;
Java me: Java handheld edition for embedded and mobile development.
Chapt 1
1) Java
Differences between two-dimensional arrays in Java and C #
Click: 0
Differences between two-dimensional arrays in Java and C)
Differences between the two exceptions in Java
Click: 1
When we develop java, we usually encounter code problems that protect our development. Because java is based on jvm, it is easy to decompile class files. Assume that we have developed a web program and released it to the customer. In fact, the
JNI is used in the android project. When proguard is used, it is found that many variables cannot be found in the native method. It was originally optimized by produard. Therefore, use progurad with caution in JNI applications.
Solution:1. Add a
The last static keyword, self-think more detailed. Do not know can leave a message. The following goes on: static Final member variable: is a member variable of a class that is both final and static decorated. It is similar to a member variable that
What is Data Hiding? Some people will find it hard to understand. In the previous article, when we introduced the class, we mentioned that the keyword used to define variables is public, but there are more than public, private, protected, static,
1. Static variablesThere are two ways to classify a class member variable statically: A variable that is statically modified, called a static variable or a class variable, and another variable that is not modified by static, called an instance
Java-based final and static keywords, javafinalstaticI. finalAccording to the context of the program, it can modify non-abstract classes, non-abstract class member methods and variables. The final class cannot be inherited and has no subclass. The
Purpose of object serialization1) Want to persist Java objects in a file2) Using Java Objects for network transport
Implementation methodIf you want an object of a class to be serialized/deserialized, That class must implement the
2016-06-291 Interface OverviewModifiers for abstract class abstractionsModifiers for the interface interfaceExtends can only be aImplements can be multipleInterface only abstract method, it is more abstract than abstract class, interface is a
Compare and analyze the differences between spring AOP and AspectJ English original: Comparative analysis between Spring AOP and AspectJTags:AspectJ Spring 158 People collection This article, I want to collect Oschina recommended 3 years ago (total 7
The Java language provides an interface (interface) mechanism. This interface mechanism makes Java object-oriented programming more flexible. We can use interfaces to define the representation of a class, but the interface cannot contain any
The interface chapter talks about abstract class and interface, the abstract class feeling is very abstract in simple reading. And the interface of this chapter of the knowledge point, and did not like before the detailed, but also broken and
Nine, interfaceInterfaces and internal classes provide us with a more structured approach to separating interfaces from implementations.1. Abstract classes and abstract methodsAbstract classes are a kind of moderation between common classes and
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.