ÕûÀíÓÃJavaʵÏÖÊý×Öת»¯³É×Ö·û´®×ó±ß×Ô¶¯²¹Áã·½·¨
Java ÖиøÊý×Ö×ó±ß²¹0 £¨1£©·½·¨Ò»
import java.text.NumberFormat; public class NumberFormatTest { public static void main(String[] args) {
//´ý²âÊÔÊý¾Ý
int i = 1;
//µÃµ½Ò»¸öNumberFormatµÄʵÀý
NumberFormat nf = NumberFormat.getInstance();
//ÉèÖÃÊÇ·ñʹÓ÷Ö×é
nf.setGroupingUsed(false);
//ÉèÖÃ×î´óÕûÊýλÊý
nf.setMaximumIntegerDigits(4);
//ÉèÖÃ×îСÕûÊýλÊý
nf.setMinimumIntegerDigits(4);
//Êä³ö²âÊÔÓï¾ä
System.out.println(nf.format(i));
}
} À´Ô´£ºhttp://blog.csdn.net/xiaohunzhang/archive/2008/08/07/2782592.aspx £¨2£©·½·¨¶þ£¨¸öÈËÒÔΪ¸Ã·½·¨¼òµ¥ÓÐЧ£¬µ«¾ÊÔÑéËƺõString.format()º¯ÊýÓÐÎÊÌ⣩ public class TestStringFormat {
public static void main(String[] args) {
int youNumber = 1;
// 0 ´ú±íÇ°Ãæ²¹³ä0
// 4 ´ú±í³¤¶ÈΪ4
// d ´ú±í²ÎÊýΪÕýÊýÐÍ
String str = String.format("%04d", youNumber);
System.out.println(str); // 0001
}
}
À´Ô´£ºhttp://liuwei1981.javaeye.c
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
synchronizedµÄÒ»¸ö¼òµ¥Àý×Ó
public class TextThread
{
/**
* @param args
*/
public static void main(String[] args)
{
// TODO ×Ô¶¯Éú³É·½·¨´æ¸ù
TxtThread tt = new TxtThread();
  ......
javaÖеÄʼþ»úÖƵIJÎÓëÕßÓÐ3ÖÖ½ÇÉ«£º
1.event object£º¾ÍÊÇʼþ²úÉúʱ¾ßÌåµÄ“ʼþ”£¬ÓÃÓÚlistenerµÄÏàÓ¦µÄ·½·¨Ö®ÖУ¬×÷Ϊ²ÎÊý£¬Ò»°ã´æÔÚÓëlisternerµÄ·½·¨Ö®ÖÐ
2.event source£º¾ßÌåµÄ½ÓÊÜʼþµÄʵÌ壬±ÈÈç˵£¬Äãµã»÷Ò»¸öbutton£¬ÄÇôbutton¾ÍÊÇevent source£¬ÕâÑùÄã±ØÐëʹbutton¶ÔijЩʼþ½øÐÐÏàÓ¦£¬Äã¾ÍÐè ......
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
JavaÊÂÎñAPI£¨JTA£»Java Transaction API£©ºÍËüµÄͬ°ûJavaÊÂÎñ·þÎñ(JTS£»Java TransactionService)£¬ÎªJ2EEƽ̨ÌṩÁË·Ö²¼Ê½ÊÂÎñ·þÎñ¡£Ò»¸ö·Ö²¼Ê½ÊÂÎñ£¨distributedtransaction£©°üÀ¨Ò»¸öÊÂÎñ¹ÜÀíÆ÷£¨transaction manager£©ºÍÒ»¸ö»ò¶à¸ö×ÊÔ´¹ÜÀíÆ÷(resource manager)¡£Ò»¸ö×ÊÔ´¹ÜÀíÆ÷£¨resource manager£©ÊÇÈÎÒâÀàÐ͵ ......