1. Java Resources
Very good to learn Java Web site
Compare full jar package download site
2, commonly used tools inventory the most popular Java tools
Myeclipse&&eclipse:
Use SVN under MyEclipse (Eclipse)
Subclipse
MyEclipse Use
Competition in the Java version of the code to see a relatively small, the blogger collation release:
Subway construction
Problem DescriptionA city has n transportation hubs, of which number 1th and n are very important, in order to enhance the
Thread Affinity
Why thread CPU affinity is required
Applications are executed in a multi-threaded manner, most of which can be reasonably scheduled. In some cases, however, an important thread is paused, and the time slice is assigned to an
First, look at two pieces of code.
By inheriting the thread class
class mythread extends thread{ private int ticket = 10; private string name; public mythread (string name) { this.name =name; }
The is known as a framework that is a bit exaggerated, and is primarily handy for unit testing when using sublime to develop Java. Testcase.java
Import java.util.*;
Import Java.lang.reflect.Method;
Import Java.lang.reflect.Modifier; Public
Read the connection string from the Operation profile properties, which is a data connection that requires three files to be written, two of which are Java classes, and one is a file with a suffix named. Properties, which is placed in the SRC
Work content:
1. Set Learning
2. Generic Learning
Learn to share:
1. Typical generic collection list,hashmap
Common definition Generic Collections:
list list = new arraylist ();
"The storage type must be of type T, you can use object to store all
New two projects, one client, one server, first start the server and then start the client
The read-write operation thread classes for both projects are essentially identical
Service side:
Import Java.io.BufferedReader;
Import
1, using the Inheritance thread class creation thread to define a subclass of a Java.lang.Thread class and override its Run method: Class Mythread extends thread{ public void Run () {...} } and then generates the object for the class:
Summary of several ways of Java parsing XML
The first type: DOM.
The full name of the DOM is the Document Object model, also known as the documentation objects. In the application, the DOM-based XML parser converts an XML document into a
familiar with InetAddress class: The InetAddress class is used primarily to get the specified network address,
InetAddress class does not have a direct explicit constructor。 To generate a InetAddress object, you must use a factory method that is
1. According to the ice file generation corresponding Java file, cmd command to switch to the ice file directory, the implementation of Slice2java Xx.ice
Ice files can be specified for enrollment
[["Java:package:com.company.ice"]]
2. The
Program requirements: Read into the user input of the two integers K1 and K2 (K2>K1), and then output K1 and K2 gcd.
Reference program:
Import Java.util.Scanner;
public class P02 {public
static void Main (String arg[])
{
int k1,k2;
k1=0;
When a Java program violates Java semantic rules, the Java virtual machine will take on the error table
is shown as an exception. The violation of the semantic rules consists of 2 cases. One is the semantic check built into the JAVA class library.
Reprint Please indicate the source: http://blog.csdn.net/ns_code/article/details/17161237
There are two ways to implement multithreading in Java: To inherit the thread class and implement the Runnable interface, as long as it is multi-threaded in
double check locking and delay initialization
In Java multithreaded programs, it is sometimes necessary to adopt lazy initialization to reduce the overhead of initializing classes and creating objects. Double check locking is a common technique for
In the development of the project, often consider to improve user access efficiency, reduce the pressure on the server, this time will use the data cache. There are a number of technologies currently implementing caching,
For example: Jcache,
Single case Mode
A single case pattern is used very frequently in programming, designed to provide only one object in a program (guaranteed to be constructed only once), such as log objects written to logs, and Windows Task Manager implementation
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