/* *collections Tool class for manipulating List/set *arrays tool class for manipulating arrays */package pack;import java.util.arraylist;import java.util.Arrays; Import Java.util.collections;import java.util.comparator;import Java.util.list;import java.util.TreeSet;public C
Original: Java common regular Expression validation tool class Regexutils.javaSource code: Http://www.zuidaima.com/share/1550463379442688.htmJava Forms register a common regular expression validation tool class, a large collection of commonly used regular expressions.1. Phon
If you want to study someone else's code, but you have only. class file, if you convert class to Java file, Jad can be implemented, about Jad download, many online, you can download it yourself.If you install Jad in the C:\jad directory,1. First copy the compiled generated Test.class file to this directory,2. Enter Jad in the Command Window environment and run ja
[] args) {ArraylistA1.add ("ABC1");A1.add ("ABC2");A1.add ("ABC3");for (String s:a1)SOP (s);HashmapHm.put (1, "a");Hm.put (2, "B");Hm.put (3, "C");For (Integer I:hm.keyset ())SOP (i+ "::" +hm.get (i));For (map.entrySOP (me+ "::" + "--" +me.getkey () +me.getvalue ());}public static {System.out.println (t);}}/** New features in version 1.5, 1. Variable parameters:* is a shorthand form of an array parameter that does not have to be set up manually every time the array object is created.* Simply p
Next, "Java Foundation--Set (ii)--iterator, Map collection"Six. Generic type(1) Definition: generics are special types that put explicit types of work in the form of creating objects or calling methods. (2) Format: Arraylist(3)Benefits: (Master)A: solved the yellow warning line problemB: To advance the conversion exception during the run to the compile timeC: optimized programming, no forced type conversions required(4) Development of generics
Regular expressions are often used to validate various forms, Java forms register common Regular Expression validation tool classes, and common regular expression large collections.
1. Telephone number
2. zip Code
3. QQ
4. E-Mail
5. Mobile phone number
6. URL
7. Whether it is a digital
8. Whether it is Chinese
9. Identity card
10. Domain Name
IP .....
Common validation Everything! This is indeed
Java Web-based JdbcUtils tool class final and javawebjdbcutils
The final version of JdbcUtils tool class 3.0 adds transaction-related functions and release links. The final version can be directly packaged into a jar package, which will be used in subsequent basic projects.
File = new file (path);Gets the file name.String filename = File.getname ();Download the file in the form of a stream.InputStream fis = new Bufferedinputstream (new FileInputStream (file));byte[] buffer = new byte[fis.available ()];Fis.read (buffer);Fis.close ();Empty responseResponse.reset ();Set the header of the responseString filename = urlencoder.encode (filename, "UTF-8");if (Filename.length () >150) {//fix IE 6.0 bugFilename=new String (filename.getbytes ("GBK"), "iso-8859-1"); }Response
Cyclicbarrier Synchronization BarrierThere is a class called Cyclicbarrier in the Java Concurrency Tool class, similar to Countdownlatch, where synchronization between threads is possible, but the difference is that Cyclicbarrier is a reset synchronization barrier.Imagine a scene, there are n people to go to a door at
1. Use of the Aslist () method in the Arrays tool class1 Public static arrays into setsPrecautions:Although you can turn an array into a collection, the length of the collection cannot be changed .2. code example:(1)1 Packagecn.itcast_03;2 3 Importjava.util.Arrays;4 Importjava.util.List;5 6 /*7 * public static 8 * 9 * Precautions:Ten * Although you can turn an array into a collection, the length of the collection cannot be changed. One */ A Publ
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.