Share a Java program that uses Recursion to delete tree dataAlgorithm.
Storage: each node has an ID attribute and a parentid attribute.
Tree Structure. node0 is the root node:
Node0
| -- Node11
| ----- Node21
| ----- Node22
| ------- Node31
|
Garbled: the default title Font is sansserif, which is not available in many Chinese systems.
Solution: reset the font
============== Pie chart ==============================
// Solve Chinese garbled charactersChart. gettitle (). setfont (new
Java swingRepainting and dual-Buffer Optimization
Cause: I want to write a question in the past two days.21Point game, when using the formJframe, Flash is serious. After special processing, it will be slightly better.AWTInsideFrame, No flashes
Recently in the socket transmission, encountered packet loss problem, troubled for a long time, saw this article, the original address: http://suwish.com/html/java-tcp-socket-stream-packet-split.html is good, now much easier. In other words, the
Problem: using multi-state programming to create a shape class, we can find the square, triangle, and circle area,
Method: Abstract A Shared parent class, define a function as a public interface for area calculation, and then redefine the area
With the reflection mechanism of Java, we can access the private members and private functions of a class.
Accessing private fields
As mentioned above, the class. getfield (string) and Class. getfields () methods can only return public members.
To
Method 1: Use a third-party jar package: jxl. Jar
Public void createexcel () {try {// open the file writableworkbook workbook = workbook. createworkbook (new file ("test.xls"); // generate a worksheet named "first page". The parameter 0 indicates
No need to generate DTD, useless configuration, no need to generate helper classes, fast. This is the combination of xstream and xpp.As we all know about xstream, XML pull parser is a high-speed method for parsing XML files, which is much faster
As a New Keyword introduced by Sun, Enum looks like a special class. It can also have its own variables, define its own methods, and implement one or more interfaces. When declaring an Enum type, we should note that the enum type has the following
Setting JDK environment variables is very troublesome for beginners who want to learn more about Java. Next we will introduce how to set JDK environment variables under XP. Step 1: Right-click "my computer" and click "properties ":
Step 2: Select
In practical applications, besides the JSP tag library, you can also use the Java API provided by Oscache. Next I will introduce a practical Java class, which is created by using generalcacheadministrator to refresh and manage the cache.
General
The software used is the DJ Java decompiler 3.9.
The following is a useful reference document to illustrate how to batch compile
Http://www.udl.es/usuaris/jordim/Progs/Readme.txt
After installation, find its installation path. my options are:
public class ExceptionTypeTest { public void doSomething()throws ArithmeticException{ System.out.println(); } public static void main(){ ExceptionTypeTest ett = new ExceptionTypeTest(); ett.doSomething();
Package test; import Java. io. file; import Java. io. ioexception; public class createfiletest {/*** create a single file * @ Param destfilename file name * @ return returns true if the file is created successfully; otherwise, returns false */public
Recently, to calculate the correlation between documents, we need to use the logarithm calculation. On the internet, find the following method:The key is: 1 the java standard package provides the calculation method of the natural logarithm, 2 other
Four common functions of Java Regular Expressions
Regular expressions have powerful functions in string processing. Sun added support for them in jdk1.4.
The following describes four common functions:
Query:
The following is a code snippet:
31. EJB includes (sessionbean, entitybean) indicating their lifecycle and how to manage transactions?Sessionbean: the lifecycle of stateless Session Bean is determined by the container. When the client sends a request to create a bean instance, the
Java ant build. xml
1. What is antAnt is a build tool2. What is buildingThe concept can be found everywhere. For the image, you need to take the code from somewhere, compile it, copy it to somewhere, and so on. Of course, this is not only the same,
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