PMD 5.7.0 was released. PMD is a Java program code checker that is released using the BSD protocol. The tool can check whether the Java code contains unused variables, contains empty fetch blocks, contains unnecessary objects, and so on. The software is powerful and highly efficient, and is a good helper for Java progr
. Therefore, the JUnit Unit test framework is used to test the expected results of assertion, common data, organize and run test suites and even include graphics and text testing.
JUnit is so popular and depends on its integration into eclipse. This makes the basics of Java program testing, which can be done in the hands of programmers familiar with coded content.
The only thing that JUnit is disputing is the need to edit test cases yourself, for writ
the array are converted directly to the elements in the collection when they become collections.c, if the elements in the array are basic data types, the array will be present as an element in the collection.2,BinarySearch (): Binary lookup method,fill (): Replacement method,sort (): Sorting method, etc. Features: An array of elements can be manipulated to accept a variety of basic data types other than Boolean and an ordered list of reference types of parameters, but also the scope of the spe
;import Org.ansj.domain.term;import Org.ansj.splitword.analysis.toanalysis;public class wordsegmenttest {public static void main (string[] args) {String str = "If life can always be like a two or three-year-old child, there would have been no responsibility, it would have been no hardship." How can you hide when the responsibility is on your shoulder when you grow up? But there is a difference in size. It is a great pleasure to do a great job, and a small pleasure to do a small duty. If you want
As mentioned in the introduction Sun now provides these tools for XML processing in Java:
StAX Reader/writer
SAX Parser
DOM Parser
XPath Evaluator
XSL Processor
Jaxb
In the following sections I'll talk a bit about what these tools is, and what their purposes is.StaxThe Java StAX API is a streaming API for reading and writing XML streams. As such it resembles the older Sax A
This article is transferred from:
Java report tool function comparison
Over the past few years, the Java report market has been very popular. First, overseas products such as Crystal Reports, Brio, and style have successively entered the market, then, the Chinese table, the table creation, the huge number, and Qin, runqian, and Jie started to emerge. (some of th
Java programming thread synchronization tool Exchanger instance parsing, javaexchanger
This article focuses on the use of Java programming thread synchronization tool Exchanger. Let's take a look at the specific content.
If two threads need to exchange information about each other during the running process, for exampl
Bean-Query a Java tool library that converts an object to MapA fully tested Java tool class is just open-source. The current Code has undergone a complete test and is being applied to be placed on Maven central Repository.Bean-query
Click Here for English version.
BeanQuery is a Ja
Java command line program build tool-airline
In the past, I used to develop Java command line programs. I had a lot of trouble parsing parameters and some help information, today, when studying the interface test, I accidentally discovered a tool that allows you to quickly build a command line program.
Github address
and consumes the license (the license becomes unavailable) and, if the license is unavailable, is blocked.The Unpark () method, in turn, makes a license available.This feature makes it possible for the next park () operation to return immediately, even if the Unpark () operation occurs before Park (). This is why the above example code ended successfully.At the same time, the park () suspended thread will not be as suspend () as the thread state Runnable,park () will explicitly give the waiting
The Apache Toolkit Common-lang has a very useful tool class for handling strings, one of which is stringescapeutils, a tool class that is added to the 2.3 version above, and it can be easily html,xml with The escape and reversal semantics of Java, but also the key string can be processed to prevent SQL injection, but it seems like common-lang3.0 after I looked li
Creation ReasonThe simplified conversion of Chinese is a very common requirement.But a lot of tool classes are simply mapping. (Use Map, collection, properties) and so on.There is a serious problem: there may be a problem with the conversion of special phrases .OpenccOPENCC is a very good conversion tool. However, there are no direct Java-friendly jars available.
or decrement a time field
Get (Intfield) Returns the value of the given Calendar field
getactualmaximum (Intfield) Returns the current maximum value for a given time field
getactualminimum (Intfield) Returns the current minimum value for a given time field
getinstance () Returns a calendar instance. Because the calendar is an abstract class and cannot be instantiated, you can only get an instance of it by using this method
getTime () Return
Directory location in the project under the tool class:1. Chinese into pinyin, initials, Chinesechartopinyin, when using this class must be added Pinyin.jar,pinyin.jar has been placed in the Hqhop-framework-web project Lib directory;How to use:The Chinesechartopinyin provides only two methods:public static string Getpinyin (String src) {...} Convert Chinese characters to full spellpublic static string Getpinyinheadchar (String str) {...} Extract the f
In Java, the Jsonobject and Jsonarray base classes are provided in the Json-lib-2.3-jdk15.jar package for JSON serialization and deserialization operations. But we are more accustomed to encapsulating it further and achieving better reuse.The encapsulated JSON tool class Jsonutils.java code is as follows:Jsonutils Code, click ExpandImport java.util.ArrayList;Import java.util.Collection;Import Java.util.Hash
Tags: upd dstat void jdb Java Tool class successful cat code offJdbcutils class: 1. Create a private property * (four variables necessary to connect to the database): Dreiver URL user password 2. Privatize the constructor 3. Write the registration drive to a static block of code 4. The outside world can only get the database connection by invoking the static method of the
JconsoleStarts a graphical console that lets you monitor and manage Java applications.SynopsisJconsole [ Options ] [Connection ...]Options
The command-line options. See Options.
Connection = PID |Host:port | Jmxurl
The pid value is the process ID of a local Java Virtual machine (JVM). The JVM must is running with the same user ID as the user ID running the jcons
This seat has previously published an articleArticle: Log cutting and cleaning tools implemented in Java are heavily reproduced on the Network (although most of them do not indicate the source of the original article ^_^ ). There are a lot of official comments to this seat, hoping to provide toolsSource code. Therefore, this seat does not dare to copy itself, and now the sourceCodeShare it for your study and exchange. If you have less time, please ste
Factors to consider:1. A simple convention is better than the configuration of the same Name property copy2. Nested Properties Copy3.flattern (flat) support, to support the N-layer structure of the copy to a layer of structure.4. PerformanceHere's a page that mentions a lot of tools.Http://stackoverflow.com/questions/1432764/any-tool-for-java-object-to-object-mappingNote that many tools use static
Java concurrency and multithreading 4: Use the universal synchronization tool CountDownLatch to implement thread waitingCountDownLatch, a synchronization helper class that allows one or more threads to wait until a group of operations are being performed in another thread.Initialize CountDownLatch with the given count. Because the countDown () method is called, The await method will be blocked until the cur
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.