Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

´«ÖDz¥¿Íjavaѧϰ4

½ñÌìÎÒѧϰÁË·´ÉäÓë¶àÏ̵߳Ä֪ʶ
 
·´É䣺Class cls1=Date.class//×Ö½ÚÂë1£»
         Class cls2=Person.class//×Ö½ÚÂë2£»
 
P1.getClass();//µÃµ½×Ö½ÚÂë
Class.forName(“java.lang.String”) //µÃµ½Õâ¸öÀàµÄ×Ö½ÚÂë
 
ºǫ́Ïß³ÌÓëÁªºÏÏß³Ì
l         Èç¹ûÎÒÃǶÔij¸öÏ̶߳ÔÏóÔÚÆô¶¯£¨µ÷ÓÃstart·½·¨£©Ö®Ç°µ÷ÓÃÁËsetDaemon£¨true£©·½·¨£¬Õâ¸öÏ߳̾ͱä³ÉÁ˺ǫ́Ï̡߳£
l         ¶ÔJava³ÌÐòÀ´Ëµ£¬Ö»Òª»¹ÓÐÒ»¸öǰ̨Ïß³ÌÔÚÔËÐУ¬Õâ¸ö½ø³Ì¾Í²»»á½áÊø£¬Èç¹ûÒ»¸ö½ø³ÌÖÐÖ»Óкǫ́Ïß³ÌÔËÐУ¬Õâ¸ö½ø³Ì¾Í»á½áÊø¡£
l         pp.join£¨£©µÄ×÷ÓÃÊÇ°ÑppËù¶ÔÓ¦µÄÏ̺߳ϲ¢µ½µ÷ÓÃpp.join£¨£©£»Óï¾äµÄÏß³ÌÖС£
 
ʹÓÃRunnable½Ó¿Ú´´½¨¶àÏß³Ì
l         Êʺ϶à¸öÏàͬ³ÌÐò´úÂëµÄÏß³ÌÈ¥´¦Àíͬһ×ÊÔ´µÄÇé¿ö£¬°ÑÐéÄâcpu£¨Ị̈߳©Í¬³ÌÐòµÄ´úÂë¡¢Êý¾ÝÓÐЧ·ÖÀ룬½ÏºÃµØÌåÏÖÁËÃæÏò¶ÔÏóµÄÉè¼Æ˼Ïë¡£
l         ¿ÉÒÔ±ÜÃâÓÉÓÚJavaµÄµ¥¼Ì³ÐÌØÐÔ´øÀ´µÄ¾ÖÏÞ¡£ÎÒÃǾ­³£Åöµ½ÕâÑùÒ»ÖÖÇé¿ö£¬¼´µ±ÎÒÃÇÒª½«ÒѾ­¼Ì³ÐÁËijһ¸öÀàµÄ×ÓÀà·ÅÈë¶àÏß³ÌÖУ¬ÓÉÓÚÒ»¸öÀ಻ÄÜͬʱÓÐÁ½¸ö¸¸À࣬ËùÒÔ²»ÄÜÓü̳ÐThreadÀàµÄ·½Ê½£¬ÄÇô£¬Õâ¸öÀà¾ÍÖ»ÄܲÉÓÃʵÏÖRunnable¡£
l         µ±Ï̱߳»¹¹Ôìʱ£¬ÐèÒªµÄ´úÂëºÍÊý¾Ýͨ¹ýÒ»¸ö¶ÔÏó×÷Ϊ¹¹Ô캯Êýʵ²Î´«µÝ½øÈ¥£¬Õâ¸ö¶ÔÏó¾ÍÊÇÒ»¸öʵÏÖÁËRunnable½Ó¿ÚµÄÀàµÄʵÀý¡£
l         ÊÂʵÉÏ£¬¼¸ºõËùÓжàÏß³ÌÓ¦Óö¼¿ÉÒÔÓÃRunnable½Ó¿Ú·½Ê½¡£
ÀýÈ磺ÓÐËĸö´°¿ÚÏúÊÛ100ÕÅ»ð³µÆ±£¬
Class TestThread implements Runnable//ʹÓÃʵÏÖRunnable½Ó¿ÚµÄ·½Ê½£¬ÊµÏÖ´úÂëºÍÊý¾ÝµÄ·ÖÀë
{
       int tickets=100;
       public void run()
{
While(true)
{
If(tickets>0)
System.out.println(Thread.currentThread().getName()+”in salling ticket”+tickets--);
//Ëĸö´°¿ÚͬʱÂô£¬Ï൱ÓÚËĸö½ø³Ì¹²Ïítickets±äÁ¿£»Ëĸö½ø³Ì¹²Í¬Ê¹ÓÃÕâÒ»¶Î´úÂë
}
 
}
}
 
Public class Test{
   &n


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

java regexp

 public class Test2 {
public static void main(String[] args) {
// ¼òµ¥ÈÏʶÕýÔò±í´ïʽµÄ¸ÅÄî
/*
* p("abc".matches("...")); p("a8729a".replaceAll("\\d", "-")); Pattern
* p = Pattern.compile("[a-z]{3}"); Matcher m = p.match ......

javaÖеľ²Ì¬´úÀíÓ붯̬´úÀí

javaÖеľ²Ì¬´úÀíÓ붯̬´úÀí
    ±¾À´´òËã½ñÌìдµãjpa·½ÃæµÄ¶«Î÷£¬½á¹û¸ãÉÏÁË´úÀí£¬Ë÷ÐԾͰÑÑо¿³É¹û·Å³öÀ´°É£¬javaÖеĴúÀíÓÐÁ½ÖÖÒ»ÖÖÊǾ²Ì¬´úÀíÒ»ÖÖÊǶ¯Ì¬´úÀí£¬¾²Ì¬´úÀíÆäʵºÜÈÝÒ×Àí½â£¬¾²Ì¬´úÀíÆäʵ¾ÍÊǸö×°ÊÎÆ÷¶øÒÑ£¬¶ø¶¯Ì¬´úÀíÔò½èÖúÓÚjvmµÄÖ§³Ö£¬ÔÚÔËÐÐʱ¶¯Ì¬Éú³É´úÀíÀà¡£
    ÔÚÕ ......

Java¾²Ì¬³õʼ»¯£¬ÊµÀý³õʼ»¯ÒÔ¼°¹¹Ôì·½·¨

 
Ê×ÏÈÓÐÈý¸ö¸ÅÄîÐèÒªÁ˽⣺
Ò»£®¾²Ì¬³õʼ»¯£ºÊÇÖ¸Ö´Ðо²Ì¬³õʼ»¯¿éÀïÃæµÄÄÚÈÝ¡£
¶þ£®ÊµÀý³õʼ»¯£ºÊÇÖ¸Ö´ÐÐʵÀý³õʼ»¯¿éÀïÃæµÄÄÚÈÝ¡£
Èý£®¹¹Ôì·½·¨£ºÒ»¸öÃû³Æ¸úÀàµÄÃû³ÆÒ»ÑùµÄ·½·¨£¬ÌØÊâÔÚÓÚ²»´ø·µ»ØÖµ¡£
¶ÔÓÚÕâÈý¸ö¸ÅÄ¸ø³öÒÔϳÌÐò£¬·½±ãÀí½â£º
Java´úÂë 
class Book{    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ