Differences between interfaces and abstract classes1. The interface can be inherited multiple times, and the abstract class cannot.
2. The interface definition method is not implemented. The abstract class can implement some methods.
3. The basic data members in the interface are static and final by default, while the abstract class is not
If you know something in advance, it will become a basic class,
The first choice is to turn it into an interface.
Abstract classes should be considered only when method definitions or member variables must be used.
128 what design patterns are used in development? In what scenarios? Answer: Factory: factory mode, used to decouple singleton: Singleton, used to reduce spam objects and cache iterator: Used to traverse objects
Templete: Template mode, used to process the set in hibernate with the same operation steps
1. Bag class: unordered and repeatable Elements
2. Set class: The elements are unordered and cannot be duplicated.
3. List class: The elements are ordered and can be repeated.
4. array class: Array
5. Map class: 54 ing relationship 54. What is Java serialization and how to implement Java serialization?
A: serialization is a mechanism used to process object streams. Object streams stream can stream objects, perform read/write operations, or transmit data between networks. Implement the serializable Interface
Servlet Lifecycle A: When a Web container loads servlet, the lifecycle begins. Call the servlet Init () method to initialize the servlet. You can call the service () method to call different do *** () methods based on different requests. End the service. The Web Container calls the Servlet's destroy () method.
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.