Use of regular expressions in Java 1

1. Backslash and escape characterNo more nonsense, just on the demo. Public Static voidMain (string[] args) {//TODO auto-generated Method StubString phonenum= "28516885191"; Isphonenum (Phonenum); } //13800000876 Public Static

Java Send mail program

Java Send mail programThe recent project team has a requirement, need to use Java program to send mail, so summed up a bit, specifically see below:Package com.ixmsoft.apsa.utils;import java.util.properties;import javax.mail.message;import

Java operators--with (&), non (~), or (|), XOR (^)

Public classTest1 { Public Static voidMain (string[] args) {/*The symbol is: Highest bit at the same time, 0 is a positive number, 1 is negative*/ /** 1, binary conversion to decimal * * Binary conversion to 10 binary rule is: The value of

Java Learning notes Multi-Threading Two

See a thread-telling story, it is very interesting, I admire the author can be so vivid to tell, click to jump to read this article: "I am a thread"  Continue to summarize in my notes--Understanding Thread safety issues:Here are the examples of the

Java Sorting algorithm

Java sorting algorithm 1) Category: 1) Insert sort (direct insert sort, hill sort) 2) Swap sort (bubble sort, quick Sort) 3) Select sort (Direct select sort, heap sort) 4) Merge sort 5) Allocation sort (box sort, cardinal sort) required auxiliary

java-Collection (vi)

Arrays; a tool class for manipulating array objects, which are static methods. Aslist method: Converts an array into a list collection. String[] arr = {"abc", "KK", "QQ"}; list list = Arrays.aslist (arr);//convert arr array to list collection. What

The Java version of the total number of 1000 or less

/ * * If a natural number, all its true factors (that is, other than its own approximate) and exactly equal to itself, this number is called the complete number, short-end number. * For example: 6=1+2+3. * Title: Please complete the number within 1

Java Fifth time job

Import Java.awt.Color;Import Java.io.File;Import Javax.swing.JFrame;Import javax.swing.JList;Import Javax.swing.JMenu;Import Javax.swing.JMenuBar;public class FileUtils {/*** Lists all files in the specified folder (directory) or the name of the

Linux Configuration Java Environment variables

Linux Configuration Java Environment variables (verbose)First, download the decompression JDK1, download JDK Java version on the official website, I am under jdk-7u80-linux-x64.tar.gz2, copy the JDK to the Linux server, I generally use FileZilla to

Java Fifth time job

Package Liebiao;Import Java.io.File;Import Javax.swing.JFrame;Import javax.swing.JList;public class Liebiao extends jframe{private static final File dir = null;private static Object String;/*** @param args* @throws illegalaccessexception*/public

Java IO5: Serialization and deserialization

I. The concept of serialization and deserializationThe process of converting an object to a sequence of bytes is called serialization of an object.The process of reverting a sequence of bytes to an object is called deserialization of the

Java garbled problem

garbled characters are often caused by the non-uniform character set, but the author of the program is another situation caused. Message + = (char) ins.read ();Just because of this code ...The reason is this: when casting with char, only ASCII codes

The lock mechanism of Java

Transferred from: http://blog.csdn.net/yangzhijun_cau/article/details/6432216A piece of synchronized code is executed by a thread before he gets the permission to execute this code, in Java is the lock that gets a synchronization object (one object

The Java object and the JSON string are transferred to each other

1. Using the Fastjson.jar Package2. Converting a string into a list result setlist columns = Json.parsearray ("JSON string", Test.class);3. Converting a string into a Java objectTest test = Json.parseobject ("JSON string", Test.class);4. Convert

Java Package test

Let's find a directory, like C:\myjob.Then we set up two directories, one called SRC, the other called binThen we write the program in the SRC directory.We write 4 java files[Java]View PlainCopyprint? A.java Package com.lightning;

Eclips Introducing Java source code

Window->>preferences->>java->installed JREsThis is the text of theClick "Installed JREs" to select the JDK as shown:Click Edit, select the Rt.jar package and click Add Source code attachment.A brief introduction to several packages in Java: Dt.jar

Reference passing and value passing of parameters in Java

1. Some definitionsValue passing: Assigns the value of the actual passed-in parameter to a copy in memoryReference passing: The address of the actual parameter passed in2. Pass the parameters of the basic typeBecause Java is a value pass, it is not

Java memcache applications

1 Importjava.io.Serializable;2 ImportJava.text.DateFormat;3 Importjava.util.Date;4 ImportJava.util.Map;5 6 Importcom.danga.MemCached.MemCachedClient;7 ImportCom.pt.util.memcached.MemcachedTool;8 9 Ten Public classtestmemcached { One A /** -

Use of Java internal classes

Http://www.cnblogs.com/wenruo/p/5387995.htmlAn inner class is another class that is nested within a class.Non-static inner classThe way to create an inner class is to define the class inside the outer class. class out { class ' in {}} Inner

Weak references in Java

Strong referencesStringBuffer buffer = new StringBuffer();Normal object creation is this type, and as long as buffer exists, the object will not be recycled by GC. It can also cause some problems, such as: When you add a handle to a hashmap, they

Total Pages: 6206 1 .... 2507 2508 2509 2510 2511 .... 6206 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.