During debugging today, we found a bug:
Java. lang. classcastexception: Java. lang. integer cannot be cast to Java. lang. stringorg. apache. JSP. complaintsearchlist_jsp. _ jspservice (complaintsearchlist_jsp.java: 93) Org. apache. jasper.
ThrowsException description, indicating a methodPossibleAn exception is thrown. After a method is used, it is followed by a list of potential exceptions, such as void func () throws.
Aexception, bexception {//....1). If there is a method void a ()
When you use mediarecorder to record a video,
Mmediarecorder. setvideosource (mediarecorder. videosource. camera); mmediarecorder. setoutputformat (mediarecorder. outputformat. mpeg_4); mmediarecorder. setvideoframerate (20); mmediarecorder.
According to UNIX network programming, Io models can be divided into: Blocking Io, non-blocking Io, Io multiplexing, signal-driven Io and asynchronous Io, according to the POSIX standard, there are only two types: Synchronous Io and asynchronous Io.
Recently, operations on large files are required in the project, and Java I/O tests are conducted.
For fileoutputstream, bufferedoutputstream, and filewriter in the Java. Io package,The test code and result are as follows:Environment: machine IBM
Common formatting in JSP includes:1. String formatting2. format the string and HTML display content3. format the date
1. String formattingString processing is the most frequently used in projects. Java provides two methods to format strings. JDBC
Exceptions in Java are divided into two different situations: 1. exceptions that the compiler forces the user to handle; 2. Non-mandatory exceptions. (Java is the only language that enables the compiler to force the user to handle exceptions)
For
Regular Expression
1. username regular expression mode (test code please download) ^ [a-z0-9 _-] {3, 15} $ ^ # line start [a-z0-9 _-] # match characters in the list, a-Z, 0-9, underline, with a length of at least 3 characters and a maximum length
Three test classes are used to illustrate different scenarios of synchronized applications.
The first is the use of the most basic Synchronized Method.
Package COM. jadyer. thread. sync; /*** Synchronized Method Test * @ see =======================
Thread Pool (Java. util. Concurrent. threadpoolexecut
6. Recommendation
With the contribution of Doug Lea, A multithreading master, many concurrent features are added to jdk1.5, such as the thread pool.
I. IntroductionThe thread pool class is Java.
In the producer and consumer models, you must ensure the following:(1) only one producer can produce data at a time.(2) Only one consumer can consume at a time.(3) The producer cannot consume the product at the same time.(4) When the message queue
To understand the prototype mode, you must first understand the shortest replication and deep replication in Java. In some cases, replication is also called cloning. Java provides these two cloning methods.
Shortest: all the variables of the cloned
Problem scenario: In a string, an English character occupies one byte, while a Chinese character occupies two bytes. The number of bytes is used to intercept a string. Therefore, the preceding problem occurs.
It is possible to extract half Chinese
Reprinted please indicate the source!
Link: http://blog.csdn.net/zgyulongfei/article/details/7738970
During the project, all the int and long values need to be converted to byte when sending network streams according to the protocol. Therefore, the
I talked about 23 Java design patterns from mm-too classic-go to my blog
As a programmer, the design pattern is becoming increasingly popular. the attention of the net community. This change is very gratifying. the Java Community is ahead of us, but
Passing the parameters of the Java method
Basic Type
The parameter passing of Java methods is sometimes not easy to understand, and some analysis is carried out based on simple graphics. For more information, see .
This article first looks at
1st page Java development skills: How to Use ant to manually build a project
The Java language is used to build projects. In this process, compilation, packaging, running, deployment, and other operations are mainly involved. Use a SRC folder in the
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