ArrayList, LinkedList and HashMap source code is to see together, horizontal contrast bar, feel to these three kinds of data structure understanding deepened a lot.>> arrays, linked lists, and hash table structuresThe data structure has the array
HashMap is a lightweight implementation of Hashtable (non-thread-safe implementation), they all complete the map interface, mainly different from the hashmap allow null (NULL) key value (key), because of thread safety, more efficient than
(a) The basic types in Java are mainly divided into: integers, bytes, floating-point numbers, characters, Booleans. Integers: Short (2 bytes), int (4 bytes), Long (8 bytes) Bytes: Byte (integer that can represent -128~127) floating-point number:
Java learning points summed up a good article, the small partner can see which one will not which and then targeted learning.Reprinted from HollisFirst, the basic article 1.1 JVM1.1.1. Java memory model, Java memory Management, Java heap and stack,
How to check whether an array (non-sorted) contains a specific value. This is a very useful or often used in Java. This is a question of high votes in the stack overflow. There are many different ways to deal with the already high-ticket answers,
1. What is a reflection mechanism?Based on the web, the reflection mechanism in Java can be defined like this:The Java reflection mechanism is in the running state, for any class, can know all the properties and methods of this class, for any one
Java provides two ways to create a thread:
By implementing the Runable interface;
By inheriting the thread class itself.
Thread synchronizationWhy use synchronization? Java allows multithreading concurrency control, when multiple
From: http://blog.csdn.net/zyplus/article/details/6672775Have the appropriate code modifications.In Java, there are no similar methods related to PV operations, process mutexes, and so on. Java's process synchronization is achieved through
Java Concurrency Programming (10): Copyonwritearraylist of concurrent Containers (reprint)Original link:http://ifeve.com/java-copy-on-write/ Copy-on-write abbreviation Cow, is a kind of optimization strategy used in program design. The basic idea
Highlights HashMap. Let's start by describing what a map is. In the array we index the content by the array subscript, and in the map we index the object by object, the object to index is called key, and its corresponding object is called value.
String str = "Hello World"1, Str.length ();//Get string length2, Str.indexof (string s);//Find the position of the character in the string, which returns the index position of the first occurrence of the argument string s in the specified string,
Diagram of the collection class in Java:CollectionFirst, the largest interface in the collection--collectionYou can see the most common methods in the collection interface by looking at the JDK help documentation. These methods are demonstrated by
The previous essay said that the method of setting up Javaweb running environment on CentOS, this article mainly talk about packing and uploading server.One, database connection file. propetiesFor database security, mysql3306 port access I made IP
JVM-runtime data zone and JVM-runtime data ZoneRuntime data Zone1. Program Counter Register: it is a small memory space and can be seen as a line number indicator of the bytecode executed by the current thread.
--> The bytecode interpreter selects
Android reference documentation local open slow, JAVA solution, androidjava
The Android Develop document is clearly downloaded locally, but it is still very difficult to open in the browser, because the html document contains links and scripts
Two threads of Java multi-thread communication print AB each 10 times, and java multi-thread Communication
A typical interview question: two threads print AB respectively, where thread A prints A and thread B prints B, each of which prints 10 times,
I. Illustration: the String in Java is non-mutable. javastring
Here are a bunch of examples to illustrate the immutable Java String.
1. Declare a String
String s = "abcd";
The s Variable saves the reference of the string object. The arrows below
Detailed description of shift operations in java
The shift operation in java is only valid for int and long. The values of byte, short, and char are upgraded to int before the shift.
There are three shift operators: >>( right shift), >> (right
Application System Log collection solution and log collection solutionOverview
Use Flume + MongoDB to collect logs from multiple existing application systems. Feature data flow diagram
Note: The first architecture is to directly write log data to
Java function parameters
It is easy to confuse whether java function parameters pass values or reference pairs. Most of the time, this problem may be blurred and may even cause some errors. The most common saying is that the basic type is to pass
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