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
Ïà¹ØÎĵµ£º
annotations : ×¢ÊÍ
ºÃ´¦
1.Îĵµ±àÖÆ
2.±àÒëÆ÷¼ì²é
3.´úÂë·ÖÎö
JSR 175 ÊDZà³ÌÓïÑÔµÄÔªÊý¾Ý¹¤¾ß,Ϊ½«ÔªÊý¾ÝºÏ²¢µ½ºËÐÄjavaÓïÑÔÖÐÌṩÕýʽÀíÓɺÍ˵Ã÷
»ù±¾ÖªÊ¶:
×¢ÊͲÉÓÃ"@"±ê¼ÇÐÎʽ,ºóÃæÊÇ×¢ÊÍÃû³Æ,È»ºóÔÚÐèÒªÊý¾Ýʱ,ͨ¹ýname=value¶ÔÏò×¢ÊÍÌṩÊý¾Ý
×¢Ê͵ÄÈý¸ö»ù±¾ÖÖÀà:
±ê¼Ç×¢ÊÍ ......
System.out.println(2.00 -1.10);//0.8999999999999999
ÉÏÃæµÄ¼ÆËã³öµÄ½á¹û²»ÊÇ0.9£¬¶øÊÇÒ»Á¬´®µÄСÊý¡£ÎÊÌâÔÚÓÚ1.1 Õâ¸öÊý×Ö²»Äܱ»¾«È·±íʾ
Ϊһ¸ödouble£¬Òò´ËËü±»±íʾΪ×î½Ó½üËüµÄdouble Öµ£¬¸Ã³ÌÐò´Ó2 ÖмõÈ¥µÄ¾ÍÊÇÕâ¸öÖµ£¬
µ«Õâ¸ö¼ÆËãµÄ½á¹û²¢²»ÊÇ×î½Ó½ü0.9 µÄdoubleÖµ¡£
Ò»°ãµØ˵£¬ÎÊÌâÔÚÓÚ²¢²»ÊÇËùÓеÄСÊý¶¼¿ÉÒ ......
×î½üÒ»Ö±ÔÚ¿´primer c++£¬º¯ÊýÒ»Õ¶Ôc++º¯ÊýÖ®¼ä´«µÝ²ÎÊýÓÐÏêϸµÄ½²½â£¬´«Öµ¡¢´«Ö¸ÕëºÍ´«ÒýÓõÄÓ¦ÓÃÓëÇø±ð¶¼½²µÃºÜÇå³þ£¬
ÒÔÇ°Ò»Ö±ÓÃjava£¬ÓÉÓÚjavaûÓÐÖ¸Õ룬µ±Ê±Ò²Ã»ÓÐÒýÓÃÕâ¸ö¸ÅÄËùÒÔûÓжÔjava²ÎÊýµÄ´«µÝÓйý¶àµÄ˼¿¼£¬ÏÖÔÚ¸ãÇå³þÁËc++
´«µÝ²ÎÊýµÄ»úÖÆ£¬×ÔÈ»¾Í»á¸újava½øÐжԱȣ¬¾¿¾¹java´«µÄÊÇʲô¶«Î÷£¿
Java´ú ......
Èý²½£º
Ò»¡¢×Ô¶¨Òå±êǩʵÏÖÀࣺ 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 ......
Ö±½Óͨ¹ýmainÈë¿Ú:
argumentsÉèÖãº-Djava.library.path=¶¯Ì¬¿âËùÔÚĿ¼
ÔÚLinuxÉϵ÷.soÎļþ£º.soÎļþ ±ØÐëÃüÃûΪ£ºlibXXX.so,È磺libJni.so
ÔÚWindowsÉϵ÷.dllÎļþ£º.dllÎļþ ÃüÃû²»Òª¼Ólib,Ö±½ÓÃüÃûΪ£ºXXX.dll È磺Jni.dll
Àý£º
¶¯Ì¬¿â£ºlibJniNassirDecrypt.so »ò JniNassirDecrypt.dll
javaµ÷Óö¯Ì¬¿â´úÂë:
Str ......