Reprint Please specify source: Jiq Technical Blog-JiyichinSynchronization between threads, in addition to mutual exclusion (the mutex described earlier), there is a collaborative relationship, here we introduce some common among Java threads of collaboration.one, built-in conditional queueJust as each Java object can act as a built-in lock, each object can also act as a conditional queue, called a built-in
In the last year, a server program written using Java NiO was contacted, and the client program invokes the transaction interface provided by the service side by establishing a socket connection and sending a message.Development usually need to send some messages to debug the program, so I wrote a tool. The tool uses swing to write, the primary role is to send a
operation, and after the operation, after the memory growth. Hprof. If memory is growing, it is advisable to 3, 4 times. Then open the histogram (histogram) view separately, and in the object list, compare the retained size changes for each object.The first bit is not necessarily a leaked object, it is possible that it itself is a normal consumption of memory.The object of the leak was the sudden rise in the rankings. The distinguishing method is to look at the memory address of each object, th
Expressions the * @returnBoolean - */ in Public Static Booleanreg (String str, string reg) { the BooleanMatch =false; the About Try { thePattern pattern =Pattern.compile (reg); theMatcher Matcher =Pattern.matcher (str); theMatch =matcher.matches (); +}Catch(patternsyntaxexception PSE) { -msg = Conserror. Error_illegal_regex +pse.getmessage (); the logger.error (MSG, PSE);Bayi } the the returnmatch; - } -}At this point,
JUnit is a Java Unit Test tool, and in general Eclipse integrates this JUNIT4 test toolSince it is a test tool, although the development is used more, but as testers also need to have the idea of junit testing, and more technology does not press the bodyHere is a brief description of the usage:1. Create a junit4test project in eclipseClick "File", "New", "
How to get an HTTP request for a Java program by grabbing the package tool fiddlerSource code: Http://www.zuidaima.com/share/1550463683824640.htmGrab Bag tool Fidder is a very lightweight software that can get browser, program Http,https request.Encyclopedia Address: http://baike.baidu.com/view/868685.htmWebsite address: http://fiddler2.com/Firefox's Fidder plugi
. The behavior of this convenient method is the same as that of C.addall (arrays.aslist (elements)) ,But in most implementations, this method can be much faster to run.import Java.util.arraylist;import java.util.arrays;import java.util.List; Public classCollectionsTest2 { Public Static voidMain (string[] args) {string[] str={"Hello","Nihao","say"," Love"}; Listarrays.aslist (str); ArrayList List2=NewArrayList (); List2.addall (List1); System. out. println (LIST2); }} Like on the point
ClasspyClasspy is a graphical Class file analysis tool, similar in functionality to JAVAP, and the interface primarily refers to the Java Class Viewer:Why re-creating wheels?It took nearly a week to write this tool, so why waste time reinventing a wheel? Mainly because of the following reasons:
By writing a class parser yourself, you can thoroughly understa
just open source is a fully tested Java tool class. The current code has undergone a complete test and is applying to the MAVEN central repository. The address is as follows:Https://github.com/Jimmy-Shi/bean-queryinstructions for use are as follows:Bean-queryClick here for 中文版 version.Beanquery is a Java tool library t
Java Development Tool IntelliJ IDEA Tutorial: unit test and code coverage
This article shows how to use IntelliJ IDEA to develop Unit Testing and Analysis coverage.
1. Create a new project
Create a Java project named UnitTestingApp.
2. Create a class for testing.
Create a new class for testing.
The add method sayHello returns the Hello string.
3. Create a test
This article link: http://blog.csdn.net/xietansheng/article/details/70478082
Usually the development of JAVA projects requires the Unified management log (log) output, such as control of the log information delivery destination (console, file, etc.), control the output format of each log, the log is divided into different levels. The more mature Java log management tools commonly used are the log4j of Apach
Compile the Java Mobile Agent agent of the j2_java operating system into an exe tool.
Moliwang The color is big and the color is small.ModeratorIssue:941 Score:5
CauseIE only, sorry for Netscape Users :-) "src =" http://www.javaworld.com.tw/jute/images_zh_TW/icons/icon_copy.gif "align =" absmiddle "border =" 0 ">
The number of accounts is small, and the number of interested roles is never
")); PrintWriter pw = new PrintWriter (New FileWriter ("D:\\a.txt"), true); String line = null;while (line = Bfr.readline ())!=null) {pw.println (line);} Pw.close (); Bfr.close ();}iv.. commons-io file Tool class1. Get the file name extension/* * Filenameutils class method * static string GetExtension (string filename) * Gets the extension of the file name */public static void function () {String Name = Filenameutils.getextension ("C:\\Windows"); SYST
Source code DownloadLog4j is the de facto Java standard logging tool. Whether to use log4j to a certain extent can be said to be a measure of a developer is a qualified Java programmer standards. If you are a Java programmer, if you are not using log4j, you really need to read this article. Many friends reflect the nee
from:http://emma.sourceforge.net/EMMA:A free Java Code Coverage tool
Code coverage for FREE:A basic freedom?
Until recently, the world's Java development had been plagued by an absurd Discrepancy:java developers had excellent fre e IDEs, free compilers, free test frameworks but had to rely on code
Java build tool-ant Application Guide (1)
This article uses the latest ant
1.5.1
For example, this article introduces the installation and configuration, basic applications, and some advanced topics of this excellent build tool. The latest ant is a http://jakarta.apache.org/ant.
Ant is a Java-based build
This tool class is a tool class for sorting by Object Attributes. The following functions are implemented: 1. sort by one attribute and multiple attributes of an object. 2. objects are listed in the forward and backward order of object properties. 3. perfect support for int and other basic classes and Integer packaging classes. 4. the perfect support attribute is the class that implements the Comparable int
Recently Learning MyBatis official documents, see the "Project Document" section has a lot of content has not seen, make a note, understand.
The introduction of the encyclopedia, I can even understand, then do not find other places of information. JDepend an open source code that can be used toExcellent tool for evaluating Java program Quality (definition) , it iterates through the
PMD is an excellent tool for code checking of Java programs. It can check whether the Java code contains unused variables, whether they contain empty fetch blocks, whether they contain unnecessary objects, and so on.But in the course of use, you will find that there are a lot of error and warning in the PMD plugin, although PMD encourages programmers to improve t
1.jd-eclipsePersonally like this, if you use to write code when you encounter a third-party library that cannot find the source code, and you need to look at the specific implementation of the library, then you need to use this thing. And if you're using Eclipse, there's an eclipse plugin jadclipse,jadclipse that provides a class file viewer that can directly open a class file to view its anti-compiled source code, too convenient, too convenient!: JAD Java
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.