Java²¢·¢±à³Ì ÉÏ
Ò»¡¢Ïß³Ì
1 Ï̵߳Ĵ´½¨
´´½¨Ïß³Ìͨ³£ÓÐÁ½ÖÖ·½·¨: 1) À©Õ¹ThreadÀàʵÏÖÏ̵߳Ĵ´½¨ÊÇ×î³£ÓÃÒ²ÊÇ×îÖ±½ÓµÄÒ»ÖÖ·½·¨£¬Í¨¹ý¼Ì³ÐÀàThreadʵÏÖÏß³ÌÌ壻2) ͨ¹ýʵÏÖRunnable½Ó¿ÚʵÏÖÏß³ÌÌå¡£
2 ThreadÀàµÄ¼¸ÖÖ¹¹Ô캯Êý
1) Thread()
2) Thread(Runnable target)
3) Thread(Runnable target,String name)
4) Thread(String name)
5) Thread(ThreadGroup group,Runnable target)
6) Thread(ThreadGroup group,Runnable target,String name)
7) Thread(ThreadGroup group,String name)
3 ThreadÀàµÄ³ÉÔ±±äÁ¿¼°Æ京Òå
1) static int MAX_PRIORITY: Ï߳̿ÉÒÔÓÃÓÚµÄ×î´óÓÅÏȼ¶
2) static int MIN_PRIORITY: Ï߳̿ÉÒÔÓÃÓÚµÄ×îСÓÅÏȼ¶
3) static int NORM_PRIORITY: Ï߳̿ÉÒÔÓÃÓÚµÄĬÈÏÓÅÏȼ¶
4 ThreadÀàµÄº¯Êý±äÁ¿¼°Æ京Òå
1) static int activeCount(): ·µ»Øµ±Ç°Ïß³Ì×éÖлÏ̵߳ĸöÊý
2) static Thread currentThread(): ·µ»Øµ±Ç°Ï̵߳ĶÔÏóÒýÓÃ
3£©void destroy(): ½áÊøÏ̵߳ÄÔËÐÐ
4) String getName()£º·µ»Øµ±Ç°Ï̵߳ÄÃû³Æ
5) int getPriority():·µ»Øµ±Ç°Ï̵߳ÄÓÅÏȼ¶
6) void interrupt(): Öжϵ±Ç°Ï̵߳ÄÔËÐÐ
7) ThreadGroup get ThreadGroup: ·µ»Øµ±Ç°Ïß³ÌËùÊôÏß³Ì×é
8) static boolean interrupted(): ²âÊÔµ±Ç°Ïß³ÌÊÇ·ñ±»ÖжÏ
9) boolean isAlive(): ²âÊÔµ±Ç°Ïß³ÌÊÇ·ñÕýÔÚÔËÐÐ
10) boolean isDaemon(): ²âÊÔµ±Ç°Ïß³ÌÊÇ·ñΪÊØ»¤Ïß³Ì
11) boolean isInterrupted():²âÊÔµ±Ç°Ïß³ÌÊÇ·ñ±»ÖжÏ
12) void resume(): »Ö¸´Ï̵߳ÄÔËÐÐ
13) void run(): Æô¶¯Ïß³Ì
14) void setDaemon(): ÉèÖÃÏß³ÌΪÊØ»¤Ïß³Ì
15) void setName(String name): ÉèÖÃÏ̵߳ÄÃû³Æ
16) void setPriority():ÉèÖÃÏ̵߳ÄÓÅÏȼ¶
17) static void sleep(long millis): ÁîÏß³ÌÐÝÃßmillisºÁÃë
18
Ïà¹ØÎĵµ£º
System.out.println(2.00 -1.10);//0.8999999999999999
ÉÏÃæµÄ¼ÆËã³öµÄ½á¹û²»ÊÇ0.9£¬¶øÊÇÒ»Á¬´®µÄСÊý¡£ÎÊÌâÔÚÓÚ1.1 Õâ¸öÊý×Ö²»Äܱ»¾«È·±íʾ
Ϊһ¸ödouble£¬Òò´ËËü±»±íʾΪ×î½Ó½üËüµÄdouble Öµ£¬¸Ã³ÌÐò´Ó2 ÖмõÈ¥µÄ¾ÍÊÇÕâ¸öÖµ£¬
µ«Õâ¸ö¼ÆËãµÄ½á¹û²¢²»ÊÇ×î½Ó½ü0.9 µÄdoubleÖµ¡£
Ò»°ãµØ˵£¬ÎÊÌâÔÚÓÚ²¢²»ÊÇËùÓеÄСÊý¶¼¿ÉÒ ......
1¡¢¶ÔÏóÊÇ°´ÒýÓô«µÝµÄ---´ø"="ºÅµÄ¸³Öµ²Ù×÷
2¡¢Java Ó¦ÓóÌÐòÓÐÇÒ½öÓеÄÒ»ÖÖ²ÎÊý´«µÝ»úÖÆ£¬¼´°´Öµ´«µÝ---ÓÉ"º¯Êýµ÷ÓÃ"ÒýÆðµÄ
3¡¢°´Öµ´«µÝÒâζ×ŵ±½«Ò»¸ö²ÎÊý´«µÝ¸øÒ»¸öº¯Êýʱ£¬º¯Êý½ÓÊÕµÄÊÇÔʼֵµÄÒ»¸ö¸±±¾
4¡¢°´ÒýÓô«µÝÒâζ×ŵ±½«Ò»¸ö²ÎÊý´«µÝ¸øÒ»¸öº¯Êýʱ£¬º¯Êý½ÓÊÕµÄÊÇÔʼֵµÄÄÚ´æµØÖ·£¬¶ø²»ÊÇÖµ µÄ¸±±¾
5¡¢×¢ ......
ÓÅÏȼ¶
ÔËËã·û
Ãû³Æ
1
( )
À¨ºÅ
2
[ ] , ¡£
ºó׺ÔËËã·û
3
- (Ò»ÔªÔËËã·û£¬È¡¸ºÊý) , ! , ~ , ++ , --
Ò»ÔªÔËËã·û
4
* , / , %
³Ë£¬³ý£¬È¡Ä£
5
+, -
¼Ó£¬¼õ
6
>> , << , >>>
ÒÆλÔËËã·û
7
> , < , >= , <= , instanceof
¹ØϵÔËËã·û
8
==,!=
µÈÓÚ£¬²»µÈÓÚ
9
......
Èý²½£º
Ò»¡¢×Ô¶¨Òå±êǩʵÏÖÀࣺ myTags.java;
¶þ¡¢×Ô¶¨Òå±êÇ©¿âÎļþ£¨TLD£©: myTags.tld;
Èý¡¢Ò»¸öJSPÒ³Ã棺Ëæ±ãдÁË;
Ê×ÏÈmyTags.java
package com.tags;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
public class myTags extends ......
Nutz Java ±àÂë¹æ·¶ (V1.0) By:zozoh 0. ¹æ·¶µÄ¹æ·¶ 1. ´úÂë¸ñʽ 2.1 °ü 2.2 ÀàºÍ½Ó¿Ú 2.3 ³ÉÔ±±äÁ¿ 2.4 ³£Á¿ 2.5 ¾Ö²¿±äÁ¿ 2.6 ³ÉÔ±º¯ÊýºÍ¾²Ì¬º¯Êý ......