Operating system: Mac OS 10.11.6Tomcat version: 9.0.0.m171. After deploying Tomcat, enter localhost:8080 in the browser to enter the following page:And thenAfter clicking Cancel, there will be a prompt page:Configure Tomcat-users.xml to configure
Java file operations, relatively important, whether it is written CS or BS program, can not avoid to deal with files, such as reading and writing configuration files. Although many frameworks now help you to do this step directly!Java.io.File the
Judging the equality of strings we often habitually write the if (STR1==STR2), which may cause problems in Java.There are two ways to determine whether a string is equal in Java:1. Use the "= =" operator, which indicates whether the reference to the
in Java, = = is used to compare values for equality, equals () is a method provided by the parent class object Equals (Object obj), which is mentioned in the Java API documentation:
equalsthe method for class Object implements the most
Jdk1.5 contains the Concurrency Toolkit java.util.concurrent written by the concurrent great God Doug Lea, which contains display locks and other useful synchronization components. Doug Lea is mostly based on queue Synchronizer
VectorVector objects can be very good at inserting and deleting elements, as well as dynamic growth characteristics, compared to arrays.1. Constructors (4)
Vector ()
Vector ( C) uses generics (generic type) to determine what type of
Extract NotesA: The generic type's qualification/** Will the hotel staff, cooks, waiters, managers, respectively stored in 3 sets * Define the method, you can traverse 3 sets at the same time, traverse three sets, you can invoke the working method*/
The overall design of the Java I/O library is in accordance with the decorator mode (Decorator) and the adapter mode (Adapter). As mentioned earlier, the class that processes the stream in this library is called the Stream class. The Fileinputstream,
We write so many classes ourselves, to achieve certain functions, if you do not know the package this thing, you do not feel terrible? With the package, we can put some classes in the specified package, according to the package name to reflect a
Buffer:one, which is responsible for data access in Java NIO. The buffer is an array. Used to store data of different data types depending on the data type (except for the Boolean), a buffer of the appropriate type is
Methods in thread scheduling:
Sleep () as the name implies thread hibernationCan be passed a parameter [email protected] milliseconds @ nanoseconds
Yield () temporarily suspendedThe thread here frees up resources, but there is a pit that
Some fragments:The early Web servers were obscured by the short HTTP links, because Web pages and embedded images were generally small (at least as much as they would normally get from FTP), because the Web browser hangs the connection after
Is 1:string the most basic type of data?NoThe basic data types are byte, int, char, long, float, double, Boolean, and short.Reference data types include: classes, arrays, interfaces, etc. (simply, all types except the base data type)So string is a
Each programming language has its own unique grammatical rules, but as the C language of "the father of modern programming languages", many things in C are similar to other programming languages.Each language has its own identifier, and the
Dynamic Agent: It is through certain means, in our existing methods before and after the implementation of dynamic insertion of other actions.By this means, some repetitive function code can be extracted (such as switch database connection, logging,
Package **;Importjava.security.MessageDigest;Importjava.security.NoSuchAlgorithmException; Public classMD5 {/*** MD5 encryption algorithm, parameter selection 16 or 32 bit * default is 32 bit *@paramplaintext text to be encrypted *@paramMd5type 16/32
Explanation of Java callback mechanism and explanation of java callback
Inter-module call
In an application system, no matter which language is used for development, there must be inter-module calls. There are several Calling methods:
(1)
Simple installation of Linux-jdk1.7-tomcat7, installation of jdktomcat in linux
1. Install jdk
Package: jdk-7u80-linux-x64.tar.gz
2. Decompress
[root@localhost package]# tar -zxvf jdk-7u80-linux-x64.tar.gz
3. Configuration
Click I to edit the file
ReadWriteLock read/write lock, readwritelock read/write
ReadWriteLock maintains a pair of locks. Read locks can be used by multiple read threads concurrently, and write locks are exclusive.
The following is a simple example to learn about
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