Finally finished the experiment, wrote the report and email to the teacher.
has been very lazy, but this program is pretty smooth, with JAVA network programming and multithreading is very convenient, but the interface programming more trouble, but
Package src.com.ant.test;
Import java.util.ArrayList;
Import Java.util.HashMap;
Given a collection of strings, the format is as follows:{AAA BBB CCC}, {bbb ddd},{eee fff},{ggg},{ddd HHH}Requires merging collections where the intersection is not
1, through the Synchronized keyword to achieve, all add synchronized and block statements, in multi-threaded access, at the same time only one thread can use
Synchronized a modified method or block of code.
2, with the volatile modified variable,
In the test work is often used to compare the two date difference between days, I used to implement this feature of the two version of the method, the source code is as follows:
(version 1)
publicstaticint getintervaldays (date fdate, date odate)
1. Java objects are initialized in the following order:
Parent class
StaticFields and
StaticBlock-> Subclass
StaticFields and
StaticBlock
-> Parent class Non-
StaticFields and non-
StaticBlock-> Parent Class construction method
-> Sub Class
JDK's own class can implement the function of calling JS, and can implement the function of the operation formula in the string.
public class Runstring {
static scriptengine JSE = new Scriptenginemanager (). Getenginebyname ("JavaScript");
/
Because the Java file feature has been in use, but it's always confusing, today is a summary of all the features of Java file.Java file Operations I personally think that the important issues are:A: How to cross platform issuesB: File coding issues,
Generally speaking, there are several reasons for Java File.delete failure1. See if it is referenced by another process, delete it manually (delete is occupied by another process)2.file is a folder and is not empty, a different folder or file,3.
Eclipse uses the export jar package to open the image when it is not loaded.
The cause of this problem is mostly because of the path problem, often in the project to run normally, but once packaged into a jar can not be normal display, the following
Package com.test.bs;
/** * * 1, Unicode is a coding specification, is designed to solve global character universal code, and Rutf-8,utf-16 is a kind of implementation of this specification.
2, Java Internal use of Unicode coding norms, that
Creating Oracle Scripts
System interface and code one, Stumanage.java main interface, the default display and query out students
Package stumanage;
Import javax.swing.*;
Import java.awt.*;
Import java.awt.event.*;
public class Stumanager
Java Open Source Report Jasperreport, iReport4.5.1 use detailed (five) Table component
Through the previous chapters of the study, has a preliminary grasp of the basic use of ireport.
This section describes the use of several particularly useful
The HTTP message contains 2 kinds of messages including the request message and the response message, they all contain the starting line, the first field, and the main body three parts. The request message contains the HTTP message bit request sent
This transformation is often met in the project and is briefly described:
(1) Date converted to datetime
DateTime corresponds to the timestamp in the Java database and is converted as follows:
Java.util.Date Convert to timestamp
date = new Date
Java uses the Jpcap grab tool to obtain all TCP requests sent by this machine, and can debug the relevant HTTP request or SQL connection request sent by an application after startup according to the content of the TCP request, so that we can debug
Serious: Servlet.service () for Servlet Dispatcherservlet threw exception
Java.lang.IllegalStateException:getOutputStream () has already been called for this response
At Org.apache.catalina.connector.Response.getWriter (response.java:610)At
Run the process
We all know that Java has been promoting the slogan is: Compile, run everywhere.
After a compilation of Java program, the Java code is compiled into a byte code is a class file, and then on different operating systems rely on
A virtual machine is a virtual computer that is used to perform a series of virtual computer commands. Virtual machines can generally be divided into the following:
(1) System virtual machine: Visual Box, VMware, etc.
(2) Program virtual machine:
First, using the Org.springframework.jdbc.datasource.DriverManagerDataSource class to achieveThe 1.applicationcontext.xml configuration is as follows:BeanID= "DataSource"class= "Org.springframework.jdbc.datasource.DriverManagerDataSource">
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