/** * because Java's simple type does not accurately operate on floating-point numbers, this tool class provides accurate floating-point operations, including subtraction and rounding.
*/package com.bwsk.common.utils;
Import Java.math.BigDecimal;
First, download the installation JDK
Latest version of JDK download address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Old version of JDK download address:
(1), floating point precision calculation Shengli oilfield three-flow integration project has always been a problem, that is, each report of the amount of material and the actual amount of money to be poor, and the actual amount is inconsistent,
Package com.wd.test.state;
Import java.util.ArrayList;
Import java.util.List;
public class Stautslinktest {
public static void Main (string[] args) {
Stautslinktest test = new Stautslinktest ();
Test.test ();
}
Public String name=
Original address: http://blog.sina.com.cn/s/blog_7a27a9bf0100s887.html
Sometimes you need to find a certain type of file in your program, such as the need to find all files that have a. java suffix name under the E:\data\file_selector_test directory.
Floating-point operations in Java are represented by the nearest number of values that they can represent for many value floating-point numbers, which may lead to imperceptible errors in the calculation.
As the following example:
public class SSSs
1 Experience
1.1 for employment, Shenzhen is a very realistic place, he will not ask whether you are a key university graduate, not to ask you are SM degree, more value is personal experience, you can do things.
1.2 A programmer, must often learn,
If you find garbled characters in the content returned by spring's @responsbody, you need to solve them in the following ways.
1. Ensure that spring character Encoding Filter is configured in Web.xml:
XML Code Set
Use Eclipse to write run Java program, want to try how to compile in cmd.
Of course, the JDK will have to be installed. Otherwise there is no JVM virtual machine, how to talk about compiling.
After installing the JDK, for example, I am installing
Everyone in the landing QQ, the computer landed on the QQ, if another machine also landed on the QQ account, then QQ account will be pushed down before.
We are now using the Web to do a very simple demo.
Let's start with a simple function,
Users
1. Scope public,private,protected, and not write the difference.
A: The scope is different:
Scope Current class same package descendant class other package
public √ √ √
Give a binary tree, and its mirror image, the following figure: the right is a two-fork tree is the mirror of the left binary tree.
Solution 1 (Recursive)
Idea 1: If the current node is empty, return, otherwise exchange the left and right nodes of
Recent projects have such a need: The original system has a function of calculation, but the function of the execution time will be very long (probably need a few hours to complete), if the implementation of the error in the process, can only
Infer:eradicate Eradicate
Eradicate is specifically used to check Java annotations @nullable (shame, with so long Java, no use of this annotation), is a member of the infer inspector set to eradicate Java null pointer errors.
@Nullable annotations
The code is as follows:The following are the referenced contents:Package Com.example.pinyin.demo2;Import Net.sourceforge.pinyin4j.PinyinHelper;Import Net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;Import
For FTP automatic upload download, there will be deleted, create directories, FTP upload is a very good use of the common agreement, the basic online has a lot of content including tools, online also saw a lot of predecessors of the article, etc.,
Http://blog.sina.com.cn/s/blog_63cefe150100gtek.html
The text area can enter multiple lines of text, the main methods are: TextArea (): constructs the method, creates the text area object The row number and the column number to take the default
This blog is a guide to Jacob's articleJava operations the Microsoft Word JacobIntroduction to Jacob's use and problem resolutionUse Jacob to convert Word to HTML or txtUse Jacob to convert Word to PDFJava invokes word with Jacob (generates dynamic
(i) Related class class a { public string show (D obj) ... { return ("A and d"); } public string show (a obj) ... { return ("A and a"); } } class b Extends a ..
When we define a class that has members of the base data type in the class, but does not initialize them,
This time, if we use this variable, Java will initialize them by default.
Note: Java only initializes the base type members in the class, and
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