Method One: Most people use a method, intuitive, convenient, but inefficient.1:if (s = = NULL | | s.equals (""));Method Two: Compare string length, high efficiency, is the best I know of a method.2:if (s = = NULL | | s.length () Method Three: Java
is to write a small program, used for recording, convenient follow-up review, first thanks to the following this blog, from this article derived from it, we can learn:Http://www.cnblogs.com/lichenwei/p/4610298.htmlRead this article, feel very
The less mutable states, the easier it is to ensure thread safety.Try to declare the domain as the final type.Immutable objects must be thread-safe and can reduce the complexity of concurrent programming, make it easier and secure to share
Spring1) Open source framework2) IoC (control inversion), writes the creation and dependency of the class in the configuration file, is injected by the configuration file, realizes the loose coupling3) AOP will be safe, the transaction is equal to
/*** Compare two specified time, the result is 0 means the same,@paramFirstDay *@paramSecondday *@return */ Public Static intCompareTo (String firstday,string secondday) {Calendar C=calendar.getinstance (); Calendar C2=calendar.getinstance ()
1. What is a Lsit collection?A list collection is an ordered, repeatable collection of elements in which each element has its own element index. The list collection allows repeatable elements that can be indexed to access the elements at the
Import Java.util.regex.matcher;import Java.util.regex.Pattern; Public classregexmatches{ Public Static void Main(String args[]) {//In string lookup by specified modeString line ="This order is placed for qt3000! Ok? "; String pattern ="(. *) (\\d+) (
Example:Defining a generic StorePackage Javabased;public interface Store {}Two implementation Classes Stringstore,integerstorePackage Javabased;public class Integerstore implements store {}Package Javabased;public class Stringstore implements store {
A simple example of Java-ReentrantReadWriteLock
Content: shared during lock reading and mutex (visible running results) During lock writing are implemented through AQS.
Public class ReentrantReadWriteLockTest {static class MyObject {private Object
Change the logback configuration file path in the java web project
My small Website: http://51kxd.com/welcome to visit when you are not happy, adjust the mood
Configuration in web. xml:
LogbackConfigLocation
Spring references beans in different xml
To reference the bean defined in the Spring-Common.xml in the Spring-Output.xml, you need to use
Label. If it is referenced in the same xml file, use
Label.
package com.spring.output;public class
HTTP Protocol Introduction
I. HTTP protocol:
HTTP is short for hypertext transfer protocol (hypertext transfer protocol). It is an application layer protocol of TCP/IP protocol, used to define the process of data exchange between WEB browsers and
Four traversal methods of the Map set and four map sets
Compare the code written a long time ago with the previous one! Easy to view later
1 import java. util. hashMap; 2 import java. util. iterator; 3 import java. util. map; 4 5 public class
Spring technology Insider: Implementation Principles of Spring AOP (V)
7. Implementation of Advice notificationsWhen the AopProxy proxy object is generated, its interceptor is also generated. Next we will analyze how Aop enhances the target object.
Java basics: non-blocking IO (NIO)
Introduction
NIO (New IO) is introduced in JDK1.4 to improve the IO speed. Note that JavaNIO is not fully non-Blocking IO (No-Blocking IO), because some channels (such as FileChannel) can only run in Blocking
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