1. convert a date to a timestampPublic long gettimestamp () throws parseexception { date date1 = new simpledateformat ("yyyy/mm/dd hh: mm: SS") . parse ("2009/12/11 00:00:00"); date date2 = new simpledateformat ("yyyy/mm/dd hh: mm: SS") . parse ("1
I remember the difference between arraylist and vector I was asked during each interview. Although I knew what I was trying to answer each time, I always felt that I was not very familiar with it. So I would like to summarize the information.
JDK
1. in Java, variable types other than basic types are called application types. Objects in Java are operated by referencing them.
2. Distinction between classes and objects in the memory:
A. Classes are static and stored inCodeArea;
B. The
When creating files in Adobe flashbuilder 4.5, you can create application, module, and component files. I did not understand the three differences when I first started learning Flex. As I learned deeply, I now know the differences and usage of these
For example, an object is like a big house, and the door is always open. There are many rooms in the house (that is, the method ). These rooms are locked (Synchronized Method) and not locked (normal method ). There is a key at the door of the room,
From http://blog.csdn.net/foamflower/archive/2009/10/29/4744862.aspx
Like a mobile gateway, the ISAPI filter iisforward will repackage the request object and append some header information to WLS. In this case, directly userequest.getRemoteAddr()
Ant is an open-source Apache project. It is widely used in Java project development and has powerful functions! Therefore, we need to familiarize ourselves with this Java-based tool.
For more information about ant, see www.apache.org.
First, install
It is increasingly common to discover that this is a good book. It is a pity that Java programmers do not read this book. This chapter describes the issues related to classes and interfaces. These items are very important.
Item 12: Minimize the
Threads are embedded in Java and are not easy to understand. There are books dedicated to Java threads for your reference. This shows the importance of Java threads. This article will introduce the basic knowledge of threads in detail.
Sometimes you
Socket programming in JavaXu yingxiao (Shanghai University Computing Center 25 #) xyx@yc.shu.edu.cn
Abstract: This article introduces socket programming in Java, including programming methods on the server and client, and provides
Interface Usage:
1. Use the interface with Polymorphism: It is divided into the status at compile time and runtime.
2. Pay attention to the consistency of objects.
3. Forced conversion.
Package com;
Public interface animal {
}
Public class test implements runnable ...{
Public int X;
// Public synchronized void run ()
Public void run ()...{
System. Out. println ("threading running..." + thread. currentthread (). getname ());
Int hold;
// Synchronized (this)
...{
For (;;
Join suspend resum:Package com;
Public class test ...{
Public static void main (string [] ARGs )...{
Firstthread first = new firstthread ();
Secondthread second = new secondthread ();
First. Start ();
Second. Start ();
Try ...{
System. Out.
Insert sorting is a good choice for sorting the sorted data by insert:
Replacing arrays with vectors/**//*
* Insert sorting
*/
Private Static void insertionsort ()
...{
For (INT I = 1; I ...{
String itemtoinsert = vectorwordslist. Get (I). tostring (
The process control statements in Java are crucial to Java applications. Of course, they are also true for other languages. Next we will introduce some frequently used ones that are not mentioned. You are welcome to add them.1. Conditional operators
1. Object-oriented features
Abstract:
Abstraction is a factor that is irrelevant to the current target in a topic, while fully considering the relevant content. Abstract cannot solve all problems in the target. You can only select one part and
I have been writing the framework for the past two days. I think this is very practical and I will share it with you!
The main function is to read the object field based on the returned result set, call the set method, and put the corresponding
I searched the internet and found no articles about array iteration. So I wrote it myself.
It is mainly used to simulate an arraylist implementation!
The Code is as follows:
First, create an interface:
package com.list;public interface List extends
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