Same point:
All inherits from Abstractlist and implements the list interface
Both Randomaccess and cloneable interfaces are implemented.
The default array size is 10
All support iterator traversal
Different points:
A cast of data is required to read the data, and a string.valueof (a) can be used to cast a to a string typeSometimes a is already a string type, but for the rigor of the code, will also add string.valueof (a), then string.valueof (a) omitted will
Just beginning to touch Java, always hear AOP technology is the aspect-oriented programming technology, has been very confused, what it is, what to do with, the implementation of the principle of what. Make a summary here today.Let's start by
Problem Description: Define a function, enter the head node of a linked list, reverse the list and output the head node of the linked list after flipping;Problem analysis: In order to avoid inversion, the next pointer of the current node points to
1. Null to determine object: object BCif ( BC! = null) {}, correctIf you use Bc.equal (null), a null pointer exception appears2. Determine whether the object list collection is empty: First judge that the object itself is not an empty object, the
creating objects and assigning operations in Java directives is done separately, meaning instance = new Singleton ();The statement is executed in two steps. However, the JVM does not guarantee the sequencing of the two operations, which means that
1.FactoryMode (Factory mode)Definition: Provides an interface for creating objects to facilitate the creation of objects.2. Static Factory method model (static Factory mode)Definition: For object creation, the static method is implemented inside the
Closures and callbacks in 1.JavaThe ability to provide closures through internal classes is an excellent solution that is more flexible and secure than pointers.The value of a callback is its flexibility-it can dynamically determine what method to
The difference between sleep and wait, the problems often encountered during the interview, the lock we have to remember clearly:Same point: Allows the thread to freeze (discard CPU execution)Different points: 1,sleep must specify the time, wait can
When I recently learned Java, there was a topic:Print - to the $ all the primes betweenFirst Judgment -Second Judgment 101 .... all the time.Next to a classmate, wrote the program, found no output results, she asked me why? I had a look, and it
What is saxSAX, the full name simple API for XML, is both an interface and a package. It is an alternative approach to XML parsing. Unlike Dom parsing, sax scans the document line-by-row, parsing while scanning. Because the application simply
Communication Protocol-byte order, communication protocol byte
Recently, communication protocols have come into byte order. I remember it was too long to remember it when I went to school. Now I am talking about byte order here;
We all know that
Smart pointer (use count)STL smart pointer usage
Auto_ptr
Pi (new int (1024 ));
Define smart pointer class (use count)
Implementation Code:
Class RealPtr {friend class AutoPtr; int * ip; size_t use; RealPtr (int * p): ip (p), use (1 )
Polymorphism, polymorphismjava
Polymorphism definition (Baidu encyclopedia): Polymorphism (Polymorphism) literally means "multiple States ". In object-oriented language, multiple implementation methods of interfaces are polymorphism. Referencing
Verify the regular expression of a number.
Only one number can be entered
Expression ^ \ d $The description matches a number.Matching example 0, 1, 2, 3Example of Mismatch
Only n numbers can be entered
Expression ^ \ d {n} $ for example ^ \ d {8}
[Libevent] Reactor design mode
The design mode of the object behavior class to sort and dispatch synchronization events. Alias: Dispatcher)
The Reactor mode is a common mode for processing concurrent I/O. It is used to synchronize I/O,The central
Mockito Hello World, mockitohelloworldMockito Hello WorldProject ConfigurationIDE is Intellij IDEA. Use gradle to configure the project. Create a Java project, which must be included in gradle:
repositories { jcenter() }dependencies { testCompile
Java framework --- getting started with hibernate, java --- hibernate
Hibernate is an open-source object relationship ing framework that encapsulates JDBC objects in a lightweight manner, so that Java programmers can use the object programming
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service