Environment configuration1. First download the MongoDB jar package, my version here is Mongo-2.10.1.jar2. Configuring the MONGODB Environment1) Copy the MONGODB environment to the specified folder, I copy it to the D:\mongodb directory2) Start the
1: Introduce java.sql packet; import java.sql.*;2: Load JDBC driver Class.forName (the name of the JDBC driver package). newinstance (); 3: Generate connection If the JDBC driver has been successfully loaded, you can use the loaded driver to
I have also written about the screenshot of Java, using two or three methods, found that this method is the simplest. However, it is important to note that this method is only available for JdK1.6 and above versions.Import
Java provides four thread pools through executors, namely:Newcachedthreadpool creates a cacheable thread pool that can flexibly reclaim idle threads if the thread pool length exceeds the processing needs, and creates a new thread if it is not
Copy the source file to the destination file while outputting the source file content, you need to provide a source file and a destination file path parameter (automatically created if not present) Public Static voidcopytxt (String sourcefile,
ObjectiveInJava.utilIn the packageArraysAndCollectionsThere are many practical methods in the class that can be used in aCollectionAdds a set of elements to thearrays.aslist ()Method accepts an array or a comma-delimited list of elements (using
1. First line indicates that the Web page is using the HTML5 version2. The head content of the Web page contains the Title,meta.3. Title of the Web page, note the text or icon that appears in the upper-left corner of the browser, notice how to
Import Java.util.regex.Matcher;Import Java.util.regex.Pattern;/*** @author Administrator Test Regular expression**/public class Testregex {/*** Alt+shift+j** @param args*/public static void Main (string[] args) {/*** Using regular expressions and
Ready to work 1. Download the installation STS (Spring Tool Suite) and search, download, and install it directly in Eclipse market.2. Download and install GRADLE, spring source is built using GRADLE, unzip to any directory after download, set
1. Create a file stream, open an Excel file (JXi does not support. xlsx files, support. xls)New= Workbook.getworkbook (excelfile);2. Switch to the corresponding file nameSheet ExcelSheet = Workbook.getsheet (sheetname);3. Get the actual number of
Vector and ArrayList1, vector is thread synchronization, so he is also thread-safe, and ArrayList is thread-asynchronous, is not secure. If the security factors of the thread are not taken into account, the ArrayList efficiency is generally high.2.
1. Bubble Sort Sorting principle:The process is simple, first compares the first record's keyword to the second record's keyword, and, in reverse order, swaps two records, then compares the second record with the third record's keyword. And so on,
1. Create a file stream and open an Excel fileNewnew Xssfworkbook (excelfile);2. Switch to the corresponding file nameXssfsheet ExcelSheet = Workbook.getsheet (sheetname);3. Get the actual number of rows and columnsint // Number of rows int cols =
Struts2 FrameSTRUTS2 is a framework based on the MVC pattern, which integrates the functions of xwork on the basis of struts1.The STRUTS2 framework preprocessed some features:> Request Data Auto-encapsulation,> File Upload Features> Simplification
Java Study Notes (1): annotation specifications, java Study Notes
Annotation Specification
1,Class Annotation
A class annotation must be added before each class. The annotation template is as follows:
2,Attribute comment
Attribute
Rewrite the equals method and the equals method.
We all know that = is used to compare references (physically equal), while the equals method is used to compare values (logically equal ), in many cases, we need to override the equals method to meet
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