1, ±£Ö¤Ḭ̈߳²È«µÄÈýÖÖ·½·¨
:
a, ²»Òª¿çÏ̷߳ÃÎʹ²Ïí±äÁ¿
b, ʹ¹²Ïí±äÁ¿ÊÇ
finalÀàÐ͵Ä
c, ½«¹²Ïí±äÁ¿µÄ²Ù×÷¼ÓÉÏͬ²½
2, Ò»¿ªÊ¼¾Í½«ÀàÉè¼Æ³ÉḬ̈߳²È«µÄ
, ±ÈÔÚºóÆÚÖØÐÂÐÞ¸´Ëü
,¸üÈÝÒ×
.
3, ±àд¶àÏ̳߳ÌÐò
, Ê×ÏÈ
±£Ö¤ËüÊÇÕýÈ·µÄ
, Æä´ÎÔÙ¿¼ÂÇÐÔÄÜ
.
4, ÎÞ״̬»òÖ»¶Á¶ÔÏóÓÀÔ¶ÊÇḬ̈߳²È«µÄ
.
5, ²»Òª½«Ò»¸ö¹²Ïí±äÁ¿Âã¶ÔÚ¶àÏ̻߳·¾³ÏÂ
(ÎÞ
ͬ²½»ò²»¿É±äÐÔ±£»¤
)
6, ¶àÏ̻߳·¾³ÏµÄÑÓ³Ù¼ÓÔØÐèҪͬ²½µÄ±£»¤
,
ÒòΪÑÓ³Ù¼ÓÔØ»áÔì³É¶ÔÏóÖظ´ÊµÀý»¯
7,
¶ÔÓÚ
volatile
ÉùÃ÷µÄÊýÖµÀàÐͱäÁ¿½øÐÐ
ÔËËã
,
ÍùÍùÊDz»°²È«µÄ
(volatile
Ö»Äܱ£Ö¤¿É¼ûÐÔ
,
²»Äܱ£Ö¤Ô×ÓÐÔ
).
Ïê¼û
volatile
ÔÀíÓë¼¼ÇÉÖÐ
,
ÔàÊý¾ÝÎÊÌâÌÖÂÛ
.
8,
µ±Ò»¸öÏß³ÌÇëÇó»ñµÃËü×Ô¼ºÕ¼ÓеÄËøʱ
(
ͬһ°ÑËøµÄǶÌ×ʹÓÃ
),
ÎÒÃdzƸÃËøΪ¿ÉÖØÈëËø
.
ÔÚ
jdk1.5
²¢·¢°üÖÐ
,
ÌṩÁË¿ÉÖØÈëËøµÄ
java
ʵÏÖ
-ReentrantLock.
9,
ÿ¸ö¹²Ïí±äÁ¿
,
¶¼Ó¦¸ÃÓÉÒ»¸öΨһȷ¶¨µÄËø±£»¤
.
´´½¨Óë±äÁ¿ÏàͬÊýÄ¿µÄ
ReentrantLock,
ʹËûÃǸºÔðÿ¸ö±äÁ¿µÄḬ̈߳²È«
.
10,ËäÈ»ËõСͬ²½¿éµÄ·¶Î§
, ¿ÉÒÔÌáÉýϵͳÐÔÄÜ
.
µ«ÔÚ±£Ö¤Ô×ÓÐÔµÄÇé¿öÏÂ
, ²»
¿É½«Ô×Ó²Ù×÷·Ö½â³É¶à¸ö
synchronized¿é
.
11, ÔÚûÓÐͬ²½µÄÇé¿öÏÂ
, ±à
ÒëÆ÷Óë´¦ÀíÆ÷ÔËÐÐʱµÄÖ¸ÁîÖ´ÐÐ˳Ðò¿ÉÄÜÍêÈ«³öºõÒâÁÏ
.
ÔÒòÊÇ
, ±àÒëÆ÷»ò´¦ÀíÆ÷ΪÁË
ÓÅ»¯×ÔÉíÖ´ÐÐЧÂÊ
, ¶ø¶ÔÖ¸Áî½øÐÐÁ˵ÄÖØÅÅ
Ðò
(reordering).
12, µ±Ò»¸öÏß³ÌÔÚûÓÐͬ²½µÄÇé¿ö϶ÁÈ¡±äÁ¿
, Ëü¿ÉÄÜ»áµÃµ½Ò»¸ö¹ýÆÚÖµ
,
µ«ÊÇÖÁÉÙËü¿ÉÒÔ¿´µ½ÄǸö
Ïß³ÌÔÚµ±Ê±É趨µÄÒ»¸öÕæʵÊýÖµ
. ¶ø²»ÊÇƾ¿Õ¶øÀ´µÄÖµ
. ÕâÖÖ°²È«±£Ö¤
, ³Æ֮Ϊ×îµÍÏ޵ݲȫÐÔ
(out-of-thin-air safety)
ÔÚ¿ª·¢²¢·¢Ó¦ÓóÌÐòʱ
, ÓÐʱ
ΪÁË´ó·ù¶ÈÌá¸ßϵͳµÄÍÌÍÂÁ¿ÓëÐÔÄÜ
, »á²É
ÓÃÕâÖÖÎÞ±£ÕϵÄ×ö·¨
.
µ«ÊÇÕë¶Ô
, ÊýÖµµÄÔËËã
, ÈÔ¾ÉÊDZ»·ñ¾öµÄ
.
13, volatile
±äÁ¿
,
Ö»Äܱ£Ö¤¿É¼ûÐÔ
,
ÎÞ·¨±£Ö¤Ô×ÓÐÔ
.
Ïê¼û
volatileÔÀíÓë¼¼ÇÉ
14, ijЩºÄʱ½Ï³¤µÄÍøÂç²Ù×÷»ò
IO, È·±£Ö´ÐÐʱ
, ²»
ÒªÕ¼ÓÐËø
.
15,
·¢²¼
(publish)
¶ÔÏó
,
Ö¸µÄÊÇʹËüÄܹ»±»µ±Ç°·¶Î§Ö®ÍâµÄ´úÂëËùʹÓÃ
.(
ÒýÓô«µÝ
)
¶ÔÏóÒݳö
(escape),
Ö¸µÄÊÇÒ»¸ö¶ÔÏóÔÚÉÐδ׼±¸ºÃʱ½«Ëü·¢²¼
.
ÔÔò
:
Ϊ·ÀÖ¹Òݳö
,
¶ÔÏó±ØÐëÒª±»ÍêÈ«¹¹ÔìÍêºó
,
²Å¿ÉÒÔ±»·¢²¼
(
×îºÃ
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
´ð°¸Òþ²ØÁË£¬Ctrl+AÏÔʾ¡£½¨ÒéÏÈ˼¿¼Ò»Ï½á¹û£¬È»ºóÔËÐдúÂëÊÔÑé¡£Ò²ÐíÄã»á»ÐÈ»´óÎò¡£
1¡¢ÕÒÆæÊý£º
view plaincopy to clipboardprint?
public static boolean isOdd(int i){
return i % 2 == 1;
}
public static boolean isOdd(int i){
return i % 2 == 1;
}
ÉÏÃæµÄ·½·¨ÕæµÄÄÜÕÒµ ......
jdk/binĿ¼ÏÂnative2ascii.exeÎļþ¿ÉÒÔÖ±½Ó½«ÖÐÎÄת³Éunicode.
cmd½øµ½binĿ¼Ï£¬ÔËÐÐnative2ascii.exe¡£ÊäÈëÖÐÎĻسµºó¾ÍÉú³ÉÁËunicode±àÂë¡£
Ö±½ÓË«»÷ÔËÒ²ÐУ¬ÎÒÔÚCMDÏÂÔËÐÐÖ÷ÒªÊÇΪÁË·½±ã½«×ª»»ºóµÄ±àÂ뿽±´³öÀ´¡£
Àý£º
cmd
cd C:\Java\jdk1.5.0_17
C:\Java\jdk1.5.0_17>native2ascii
Ó¬Âñ²Ø &nb ......
ÓйØJava¶ÔÏóµÄÐòÁл¯ºÍ·´ÐòÁл¯Ò²ËãÊÇJava»ù´¡µÄÒ»²¿·Ö£¬ÏÂÃæ¶ÔJavaÐòÁл¯µÄ»úÖƺÍÔÀí½øÐÐһЩ½éÉÜ¡£
¡¡¡¡JavaÐòÁл¯Ë㷨͸Îö
¡¡¡¡Serialization£¨ÐòÁл¯£©ÊÇÒ»ÖÖ½«¶ÔÏóÒÔÒ»Á¬´®µÄ×Ö½ÚÃèÊöµÄ¹ý³Ì£»·´ÐòÁл¯deserializationÊÇÒ»ÖÖ½«ÕâЩ×Ö½ÚÖؽ¨³ÉÒ»¸ö¶ÔÏóµÄ¹ý³Ì¡£JavaÐòÁл¯APIÌṩһÖÖ´¦Àí¶ÔÏóÐòÁл¯µÄ±ê×¼»úÖÆ¡£ÔÚÕâÀ ......
ÔÚ×öpdfÎĵµ×ª³ÉjpgµÄʱºò£¬·¢ÏÖÁËJmagickµÄ´´½¨¸ßÖÊÁ¿µÄͼƬµÄÒ»¸öjavaÀà¿â,×Ô¼ºÒÔǰʹÓÃÁíÍâµÄÒ»¸öÀà¿â,¸Ð¾õÕâ¸ö¸üºÃµã,¾ÍÊÔ×ÅÓÃÁËÏÂ,¸Ð¾õ²»´í
1.ʹÓõÄwindowsϵÄjmagick-win-6.3.9-Q16.zip µØÖ·ÊÇ£ºhttp://downloads.jmagick.org/6.3.9/
2.doc¶ÔÓ¦µÄapiµØÖ·£ºhttp://downloads.jmagick.org/jmagick-doc/
3.°²×°Ima ......