As we all know, the vector and Hashtable in Java are thread-safe, mainly Java has added synchronized to both operations, that is, locked. Therefore, the operation of vectors and Hashtable is not problematic. But there is a situation: When a
#JDBC驱动: In different databases, standard SQL statements can be ported, and database actual communication protocols and some database features are not portable, so there must be another layer between JDBC and database to map JDBC calls to specific
Here I will install the jdk1.4.2_09 directly under the C disk, namely c:j2sdk1.4.2_09
The following is a detailed configuration:
1.java_home
Java_home is pointing to the installation path of the JDK
In this path you should be able to find
The use of Jndi in the Java EE environment is very simple, because all of the Java-EE containers to implement Jndi service, so, in the Java EE environment using Jndi, and the use of Hashtable is not much different. There is only one limit, that is,
"Deal with your anomalies."
-----------------
Exception handling is a very important part of Java programming. It is recommended that you read or Here are a few suggestions from the book:
* Never ignore exceptions
* Never hide the abnormal * * *
*
Automatic boxing and unpacking is a syntactic sugar in Java, which brings us some confusion when it comes to ease of use, see the following code:1 Public classTestClass {2 Public Static voidMain (String args[]) {3Integer A = 1;4Integer B =
Public Static String date_year= "Year"; // years Public Static String date_month= "MONTH"; // Month Public Static String date_day= "Day"; // Day// 7 Days Date date_day = dateoperation (date_day,-7); // 1 months Date date_month = dateoperation
Java basics 11 and java basics 11
Import java. util. encode; public class Eleventh {/* returns a positive integer of no more than five digits. First, calculate the number of digits. Second, print the numbers in reverse order. (5 scores) */public
Install svn plug-in eclipse and tortoiseSVN, svntortoisesvn
Version Control is generally used in project development. Most of them are svn (subVersion). svn can be used as a plug-in, it can also be used as a client. Today, we will introduce the two
Basic idea of the garbage collection algorithm:1. Enumerate root nodes (GC Roots)During garbage collection, we need to find out which objects are alive. Generally, some objects called GC Root are selected and enumerated from these objects. During
When Semaphore semaphores are used, it is useful for fair scheduling. When multiple threads can be controlled to compete for resources, the maximum number of threads can be executed. The code is tested by hand as follows:Note:1. acquire () to obtain
In a distributed system, session failure occurs during cross-origin access of subdomains, resulting in logon failure.For example, if a user successfully logs on to www.111cn.net but fails to switch to its personalized domain name mb.111cn.net, the
The relationship is as follows:What if they convert each other?Package the basic variables into the packaging objects by passing in parameters to the corresponding package, and convert the packaging objects into the basic type variables by using the
In general, we need to uninstall the OPENJDK that comes with linux, and then install the sun jdk.First, uninstall the built-in javaCheck whether the JDK that comes with Linux is installed.Run the following command to view the installed Java
Java random number methods Method 1: 1 // use the fixed array length n, which is achieved through the change of n.2 // key: nums [r] = nums [n-1];3 // n --;4 public class Test15 {6 public static void main (String [] args ){7 int n = 35;8 int [] nums
In the switch language, the break statement is used to terminate the execution of the switch statement. Run the first statement after the program switch statement.In Java, you can add a bracket to each code block. A code block is usually enclosed by
A queue is an important data structure. Its main application is the queuing of resources (such as printers). It should be noted that cyclic data should be used to store data.Call codePublic static void main (string [] args ){Queue = new queue ();For
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